1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 10:51:13 +01:00
Commit Graph

141 Commits

Author SHA1 Message Date
Marc Bonnici
70f646f87d AndroidWorkload: Added unchangeable android permissions
Some android permissions are categorized as 'unchangeable' so we don't need to
try and set them.
2017-05-31 10:36:35 +01:00
Marc Bonnici
b1da0fe958 AndroidDevice: Add a common_base_path utility function
Adds a utility function to determine the lowest common base path of a passed list
of files.
2017-05-11 18:17:29 +01:00
Marc Bonnici
f5b40e3d64 AndroidUtils: Updated Android_Version_Map
Added Marshmallow and Nougat SDK versions codes to the version map.
2017-05-11 09:11:23 +01:00
Sergei Trofimov
8f2ff4d2f8 cpustates: fix cluster shutdown tracking
This commit resolves a couple of issues that were causing impropper
cluster shutdown tracking in the cpustates script.

- requested_states in the PowerStateProcessor was being initalized to -1
  instead of None if no state was requested; the later checks are
  against None.
- requested_states was not being set if the request could be satisfied
  immediately, and was being cleared upon being statisfied at a later
  time. This caused a problem when a core leaves idle and then tries to
  re-enter cluster shutdown. Here is an example sequence of events that
  illustrates the issue (assume core0 and core1 are the only two cores
  on a cluster):

  	1. both cores are running
	2. core0 requests cluster-sleep. As core1 is running, it
	   is put into core-sleep instead, and its request is saved.
	3. core1 requests cluster-sleep. As core0 has a pending request
	   for cluster-sleep, both cores are put into cluster-sleep and
	   the pending request is cleared.
	4. core1 becomes active. core0 is elevated to core-sleep.
	5. core1 tries to enter cluster-sleep. Since core0 is currently
	   in core-sleep (and its prior request has laredy been
	   cleared), core1 is put into core-sleep instead, and its
	   request is saved. This is an ERROR as but cores have in fact
	   requested cluster-sleep at this stage.

  If, in step 4., core0 becomes active instead, exactly the same
  situation will result, as core1 was put into cluster-sleep immediately
  and its request was never saved.
  Idle state requests are now always tracked on entry and are only
  cleared when the core leave idle.
- Also removed a pointless identy assignment.
2017-03-24 08:55:47 +00:00
Sergei Trofimov
9a9de99c5f cpustates: added transition timeline option
Added an option to generate a timeline of state transitions, in
contrast to the existing timeline of computed states. This is primarily
intended for debugging of the latter, but may also be useful for certain
kinds of analyses.
2017-03-23 14:01:14 +00:00
Michael McGeagh
c4025cad66 Changed ActionLogger class to use nano timestamps. This is because fps instrument collects data in ns as well so is possible to match the two 2017-02-24 16:11:35 +00:00
Marc Bonnici
9ba30c27df WA Types: Added 'ParameterDict' type.
A new 'ParameterDict' has been added that automatically encodes and
decodes values when they are store in a dictionary. The dictionary uses 2 characters
prefixed to each value to store the original type information, e.g. 'fl' -> list of
floats, before being passed through a url encoder. The reverse process happens on retrieval.
To access the encoded values an `iterEncodedItems` and `getEncodedValue` methods have been added.

The appropriate unit tests have also been added.
2017-02-20 16:44:24 +00:00
jummp01
c38dc287ab Move UxperfParser into utils
UxperfParser class is moved from the UxperfResultProcessor class into a new
python module in utils. This will help to use the UxperfParser even when
the result procesor is not configured.
2017-02-03 15:14:27 +00:00
jummp01
3feb702898 fps: move VSYNC_INTERVAL into utils
It is not anything to do with instrument, but a generic ocnstant,
and this way it can be used by the other parts of the code line.
2017-02-03 15:14:16 +00:00
Marc Bonnici
b89d9bbc4b StateDetection: Moved check for missing phase definition earlier.
Now checks to see if a phase is correctly defined before image matching
so that it is only performed if required.
2017-02-01 18:04:05 +00:00
Marc Bonnici
4352e02806 APK Info: Added property to extract native code from an apk
Looks for any native code present in an apk and stores the
mapped abi(s) for use when selecting appropriate apks.
2016-12-09 14:11:16 +00:00
Marc Bonnici
693d0544a3 ABI_MAP: Added armeabi-v7a as armeabi 2016-12-09 14:11:16 +00:00
setrofim
607187ad5b Merge pull request #306 from marcbonnici/revent_BC
Revent: Fixed backwards compatibility with v1
2016-12-02 17:02:06 +00:00
Marc Bonnici
b6e077c06b Revent: Fixed backwards compatibility with v1.
Fixed new gamemode not being set for compatibility mode.
Fixed input buffer not being flushed causing replay to fail.
Fixed infinte loop if revent recording did not end correctly.
Updated revent binaries.
2016-12-02 16:58:09 +00:00
Michael McGeagh
8b82451230 util-fps: handle divide by zero possibility 2016-12-02 16:34:32 +00:00
Sergei Trofimov
5db11462be utils/power: handle devlib frequency reporting
When collecting ftrace events, the instrument will insert frequencies
into the trace to make it possible reconstruct power states when there
were no frequency transitions during the measured period.

The format in which frequencies are inserted is different in devlib.
Since post-processing scripts may be run on traces collected by devlib
as well as WA, it needs to support both formats.
2016-11-29 10:23:32 +00:00
Michael McGeagh
8edce40301 FPS percentiles: Ignore ValueError when NaN
Fixed: if index isnt zero based, drop(0) will fail
2016-11-11 17:21:47 +00:00
Michael McGeagh
dcf13f8c2c FPS - fix regex and handle empty frames 2016-11-07 17:39:51 +00:00
setrofim
d56f581a0a Merge pull request #277 from jimboatarm/fps-gfxinfo
FPS. Added gfxinfo methods of obtaining fps stats.
2016-11-04 17:11:59 +00:00
Sergei Trofimov
f12cf6d557 statedetect: pylint and dependencies fixes
- Corrected the depency for opencv bindings. Even though the library is
  imported as "cv2", the package containing it is called
  "opencv-python".
- pylint: ignore no-member warnings; cv2 pulls it's memebers dynamically
  from the underlying libopencv, so pylint can't see them.
2016-11-04 17:05:39 +00:00
Michael McGeagh
311c4e419f FPS. Added gfxinfo methods of obtaining fps stats. Auto detects and uses appropriate method via android version of device
Output 90th, 95th and 99th percentile metrics. This happens for both SurfaceFlinger and Gfxinfo methods.
2016-11-04 17:05:00 +00:00
Marc Bonnici
1daa7f97c0 ReventWorkload: Modified statedection to vary scale of images
Due to inaccuracies in revent playback, the resultant state does not
always match the templates precisely causing state detection to fail.
To help this images are now scaled to different sizes before being
matched to the templates to compensate for slight variations in size.
2016-11-04 15:25:31 +00:00
Marc Bonnici
2e1ce49170 android: Fixed issue using single quoted command with adb_shell
When using 'check_exit_code' and 'as_root' options for adb_shell with
a command containing single quotes, the provided command was escaped
twice which has now been avoided.
2016-11-02 14:52:47 +00:00
Sergei Trofimov
edfef444fb revent: Updated WA to use the new revent
- Updated the revent parser to handle the new revent format.
- Updated the revent parser to expose device info and recording
  metatdata.
- The parser can now be used in streaming and non-streaming mode (stream
  events from the file as they are being accessed, or read them all in
  at once).
- -g option added to "record" command to expose the gamepad recording
  mode.
2016-10-26 13:33:54 +01:00
Marc Bonnici
9fffa7958a ReventWorkload: State detection fixes
- Corrected code highlighting and phase names in documentation
- Fixed check_states paremeter not being honoured
- Moved state dependencies check to happen earlier in execution
  and to be a user facing error
2016-10-26 11:16:49 +01:00
Sergei Trofimov
8355fcf886 adb_shell: handle zero stdout on error
It looks like on recent systems, adb has started to correctly forward
stderr from the target device to stderr on the host (wereas in the past,
it got output to stdout on the host). This commit makes sure that
stderr gets correctly forwarded to the coller in cases where return code
checking was not enabled.
2016-10-17 10:49:53 +01:00
Sergei Trofimov
3711f7316d cpustates: fixing stand-alone script with timeline option
When running the stand-alone cpustates script and specifying a timeline
file (which causes the corresponding reporter to be enabled), a
timeline report is generated in addition to the usual cpustates and
parallelism reports.

Up to this point, the main() of the stand-alone script was expecting
exactly two reports and so it crashing when running with the timeline
option. This commit fixes this case.
2016-09-13 10:16:25 +01:00
Sebastian Goscik
f57dd83d1a pylint fixes 2016-08-25 14:20:10 +01:00
Sergei Trofimov
4ea4bc8631 ssh: fixing rasing of CalledProcessErrorWithStderr
CalledProcessErrorWithStderr is a subclass of CalledProcessError that
also takes stderr output. Both that and normal output must be passed as
keyword arguments. They were being passed as keyword arguments inside
_scp() of SshConnection, causing cryptic errors to appear.

Additionally, "output" was not being properly poped off before invoking
super's init.
2016-08-23 17:22:02 +01:00
John Richardson
86f3066f56 Add unsupported package check to AndroidUiAutoBenchmark
Add method to automatically check against a dictionary of known package
versions that don't work well with AndroidUiAutoBenchmark workloads.
Raises an exception if found.
2016-08-09 12:08:28 +01:00
setrofim
1ec7961b0e Merge pull request #210 from drcef/master
Implemented visual state detection functionality for revent workloads
2016-08-05 11:57:59 +01:00
George Psimenos
01f2a5f412 Implemented visual state detection functionality for revent workloads
- Added statedetect.py in utils which is a standalone module that
    contains all the methods needed for state detection

  - Modified the setup() and run() methods of the GameWorkload class
    in common/android/workload.py to have a parameter that enables
    state checks and run the check after setup and run if requested.

State detection uses the template matching method available in
OpenCV to determine the state of the workload by detecting
predefined unique elements on a screenshot from the device.
2016-08-05 10:09:18 +01:00
John Richardson
aa2d187c4d Fix for FpsProcessor logic in utils module
- Add requirement on filtered_vsyncs_to_compose for total_vsync metric
- Remove misleading comment in class description
2016-07-26 11:29:51 +01:00
Sebastian Goscik
9707aa6237 Pylint fixes
Pylint now checks for trailing new lines, this commit fixes them.
2016-07-21 16:40:26 +01:00
Sebastian Goscik
cb01b0c9a9 utils/revent: Added revent recording parser
revent binary recordings can now be parsed and used within WA.
2016-07-19 16:48:13 +01:00
John Richardson
b8d7956d4c Move processing logic in fps instrument to utility file
Processing logic for frame statistics can be moved out of fps instrument
to a new utility file. This will allow result processors to use the same
logic to produce frame statistics on a subsection of the data
produced by the fps instrument.
2016-07-14 13:49:39 +01:00
Sergei Trofimov
242df842bc LinuxDevice: error output for pull/push_file
Standard string representation of a subprocess.CalledProcessError does
not include the output of the command, so it was not previsouly included
in the resulting DeviceError. This commit ensures that the output is
propagated, regardless of whether it came from stdout or stderr of the
underlying process.
2016-06-28 13:48:48 +01:00
Sebastian Goscik
f276d4e39f cpustates: Added the ability to configure how a missing start marker is handled.
cpustates can now handle the lack of a start marker in three ways:

 - try: If the start marker is present only the correct section of the trace
        will be used, if its not the whole trace will be used.
 - error: An error will be raised if the start marker is missing
 - ignore: The markers are ignored and the whole trace is always used.
2016-06-06 17:09:48 +01:00
Sebastian Goscik
1811a8b733 PowerStateProcessor: Added a warning when no stop marker is encountered
PowerStateProcessor will now stop itrerating over events when it finds
a stop marker. If it does not find a stop marker it will log a warning.
2016-06-06 17:03:56 +01:00
Sebastian Goscik
0ae03e2c54 PowerStateProcessor: Exceptions no longer stop processing
If an exception is raised inside a generator it cannot be continued.
To get around this exceptions are now caught and later output via the
logger.

Also added logger setup when running cpustates as a standalone script
2016-06-06 16:28:07 +01:00
Sebastian Goscik
c423a8b4bc Utils.misc: Added memoised function decorator
This allows the return value of a function to be cached so that
when it is called in the future the function does not need to
run.

Borrowed from: https://github.com/ARM-software/devlib
2016-06-06 16:28:07 +01:00
setrofim
772346507c Merge pull request #144 from ep1cman/servo
servo_power: Added support for chromebook servo boards
2016-05-27 16:16:49 +01:00
Sebastian Goscik
0fc88a84be servo_power: Added support for chromebook servo boards
Servo is a debug board used for Chromium OS test and development. Among other uses, it allows
access to the built in power monitors (if present) of a Chrome OS device. More information on
Servo board can be found in the link bellow:

 https://www.chromium.org/chromium-os/servo

based on: 03ede10739
and: 9a0dc55b55
2016-05-27 16:09:08 +01:00
Sergei Trofimov
a9a42164a3 list_or_string: ensure that elements of a list are always strings 2016-05-26 16:05:43 +01:00
Sebastian Goscik
5a1c8c7a7e cameracapture & camerarecord: Updated workloads to work with Android M+
The stock camera app as of Android M has changed. This commit updates
the ui automation to work with this new app. As part of this change
it was required to bump the API level of the ui automation to 18.

Also made the teardown of the capture workload close the app like the
record workload.
2016-05-16 17:25:50 +01:00
Sebastian Goscik
8abf39762d hwmon: Fixed sensor naming
Previously the sensor name was just appeneded to the end of the
previous sensors name.

Now the hwmon name is added as a classifier of the metric.
If the hwmon sensor has a label, the metric will use this for its name,
if it does not then the sensors kind and ID will be used e.g. temp3
2016-05-10 09:27:42 +01:00
Sebastian Goscik
e96450d226 adb_shell: Fixed getting return codes
They way we were attempting to get return codes before always gave
us a return code of the previous echo, therefore always `0`.

This commit adds the newline into the last echo.
2016-05-10 09:12:54 +01:00
Sergei Trofimov
fe7f98a98b report_power_stats: number of entries returned always matches number of reporters
Previously, only reports that were generated were returned. With this
commit, there will be an entry for each active reporter in the returned
list. If a reporter did not produce a valid report, the entry will be
None.

This ensures consistent output, even if a run time issue causes a
reporter not to produce a report  (e.g. if cpufreq events were not
enabled).
2016-05-09 10:20:25 +01:00
Sebastian Goscik
8dc24bd327 uboot: Now detects the U-Boot version to use correct line endings
Previously Linaro U-Boot releases had a bug where they used \n\r
as the line ending. This has now been fixed which caused
issues with WA. WA now detects the U-Boot version and uses the
coresponding line ending.
2016-05-04 11:54:29 +01:00
Michael McGeagh
8a3186e1c8 CpuUtilisationTimeline added. This now will generate cpu utilisation based on frequencies and a number of samples
Fixed error in percentage when frequency is 'None'. Now default to 0 in these cases

cpu_utilisation is now a separate parameter in cpustate. Now generates a floating point number representing the utilisation based on the maximum frequency of the capture. No longer performs averaging of values, this can be done as a post-processing step

cpu utilisation now based on the max cpu freq per core, not max captured freq overall
2016-04-14 14:03:28 +01:00