mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
docs: Update python2 style print statements
This commit is contained in:
parent
2d32d81acb
commit
ecbfe32b9d
@ -336,6 +336,6 @@ recordings in scripts. Here is an example:
|
|||||||
from wa.utils.revent import ReventRecording
|
from wa.utils.revent import ReventRecording
|
||||||
|
|
||||||
with ReventRecording('/path/to/recording.revent') as recording:
|
with ReventRecording('/path/to/recording.revent') as recording:
|
||||||
print "Recording: {}".format(recording.filepath)
|
print("Recording: {}".format(recording.filepath))
|
||||||
print "There are {} input events".format(recording.num_events)
|
print("There are {} input events".format(recording.num_events))
|
||||||
print "Over a total of {} seconds".format(recording.duration)
|
print("Over a total of {} seconds".format(recording.duration))
|
||||||
|
@ -483,14 +483,14 @@ that parses the contents of the output directory:
|
|||||||
>>> ro = RunOutput('./wa_output')
|
>>> ro = RunOutput('./wa_output')
|
||||||
>>> for job in ro.jobs:
|
>>> for job in ro.jobs:
|
||||||
... if job.status != 'OK':
|
... if job.status != 'OK':
|
||||||
... print 'Job "{}" did not complete successfully: {}'.format(job, job.status)
|
... print('Job "{}" did not complete successfully: {}'.format(job, job.status))
|
||||||
... continue
|
... continue
|
||||||
... print 'Job "{}":'.format(job)
|
... print('Job "{}":'.format(job))
|
||||||
... for metric in job.metrics:
|
... for metric in job.metrics:
|
||||||
... if metric.units:
|
... if metric.units:
|
||||||
... print '\t{}: {} {}'.format(metric.name, metric.value, metric.units)
|
... print('\t{}: {} {}'.format(metric.name, metric.value, metric.units))
|
||||||
... else:
|
... else:
|
||||||
... print '\t{}: {}'.format(metric.name, metric.value)
|
... print('\t{}: {}'.format(metric.name, metric.value))
|
||||||
...
|
...
|
||||||
Job "wk1-dhrystone-1":
|
Job "wk1-dhrystone-1":
|
||||||
thread 0 score: 20833333
|
thread 0 score: 20833333
|
||||||
|
Loading…
x
Reference in New Issue
Block a user