mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
trace-cmd: set a minimum bound on trace pull timeout
The timeout for the pulling the trace file after the run is being set based on the time for which the trace was collected. For workloads with short execution time, but large number of events, the resulting timeout might be too short. To deal with this, do not let the timout be shorter than 1 minute.
This commit is contained in:
parent
4f8b7e9f59
commit
107e8414bb
@ -233,6 +233,8 @@ class TraceCmdInstrument(Instrument):
|
||||
# Therefore timout for the pull command must also be adjusted
|
||||
# accordingly.
|
||||
self._pull_timeout = (self.stop_time - self.start_time) # pylint: disable=attribute-defined-outside-init
|
||||
if self._pull_timeout < 60:
|
||||
self._pull_timeout = 60
|
||||
self.device.pull_file(self.output_file, context.output_directory, timeout=self._pull_timeout)
|
||||
context.add_iteration_artifact('bintrace', OUTPUT_TRACE_FILE, kind='data',
|
||||
description='trace-cmd generated ftrace dump.')
|
||||
|
@ -177,7 +177,7 @@ def sched_switch_parser(event, text):
|
||||
"""
|
||||
Sched switch output may be presented in a couple of different formats. One is handled
|
||||
by a regex. The other format can *almost* be handled by the default parser, if it
|
||||
weren't for the ``==>`` that appers in the middle.
|
||||
weren't for the ``==>`` that appears in the middle.
|
||||
"""
|
||||
if text.count('=') == 2: # old format
|
||||
regex = re.compile(
|
||||
@ -187,7 +187,7 @@ def sched_switch_parser(event, text):
|
||||
)
|
||||
parser_func = regex_body_parser(regex)
|
||||
return parser_func(event, text)
|
||||
else: # three are more than two "=" -- new format
|
||||
else: # there are more than two "=" -- new format
|
||||
return default_body_parser(event, text.replace('==>', ''))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user