1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-22 12:58:36 +00:00

doc/output_api: Improve examples

This commit is contained in:
Marc Bonnici 2018-04-25 16:49:10 +01:00 committed by setrofim
parent 8c9c1a8f1e
commit f60b7eca16

View File

@ -22,14 +22,15 @@ directory we can initialize a ``RunOutput`` as follows:
From here we can retrieve different information about the run. For example if we From here we can retrieve different information about the run. For example if we
want to see what the status of the run was and retrieve the metrics recorded from want to see what the overall status of the run was, along with the runtime
the first run we can do the following: parameters and the metrics recorded from the first job was we can do the following:
.. code-block:: python .. code-block:: python
In [2]: run_output.status In [2]: run_output.status
Out[2]: OK(7) Out[2]: OK(7)
# List all of the jobs for the run
In [3]: run_output.jobs In [3]: run_output.jobs
Out[3]: Out[3]:
[<wa.framework.output.JobOutput at 0x7f70358a1f10>, [<wa.framework.output.JobOutput at 0x7f70358a1f10>,
@ -37,13 +38,24 @@ the first run we can do the following:
<wa.framework.output.JobOutput at 0x7f7035862810>, <wa.framework.output.JobOutput at 0x7f7035862810>,
<wa.framework.output.JobOutput at 0x7f7035875090>] <wa.framework.output.JobOutput at 0x7f7035875090>]
# Examine the first job that was ran
In [4]: job_1 = run_output.jobs[0] In [4]: job_1 = run_output.jobs[0]
In [5]: job_1.label In [5]: job_1.label
Out[5]: u'dhrystone' Out[5]: u'dhrystone'
In [6]: job_1.metrics # Print out all the runtime parameters and their values for this job
Out[6]: In [6]: for k, v in job_1.spec.runtime_parameters.iteritems():
...: print (k, v)
(u'airplane_mode': False)
(u'brightness': 100)
(u'governor': 'userspace')
(u'big_frequency': 1700000)
(u'little_frequency': 1400000)
# Print out all the metrics avalible for this job
In [7]: job_1.metrics
Out[7]:
[<thread 0 score: 14423105 (+)>, [<thread 0 score: 14423105 (+)>,
<thread 0 DMIPS: 8209 (+)>, <thread 0 DMIPS: 8209 (+)>,
<thread 1 score: 14423105 (+)>, <thread 1 score: 14423105 (+)>,
@ -61,15 +73,23 @@ the first run we can do the following:
<total score: 92758402 (+)>] <total score: 92758402 (+)>]
We can also retrieve information about the device that the run was performed on:
We can also retrieve information about the target that the run was performed on
for example:
.. code-block:: python .. code-block:: python
In [7]: run_output.target_info.os # Print out the target's abi:
Out[7]: u'android' In [9]: run_output.target_info.abi
Out[9]: u'arm64'
In [8]: run_output.target_info.os_version # The os the target was running
Out[8]: In [9]: run_output.target_info.os
Out[9]: u'android'
# And other information about the os version
In [10]: run_output.target_info.os_version
Out[10]:
OrderedDict([(u'all_codenames', u'REL'), OrderedDict([(u'all_codenames', u'REL'),
(u'incremental', u'3687331'), (u'incremental', u'3687331'),
(u'preview_sdk', u'0'), (u'preview_sdk', u'0'),