diff options
author | Chris Redpath <chris.redpath@arm.com> | 2017-06-17 17:19:55 +0100 |
---|---|---|
committer | KP Singh <kpsingh@google.com> | 2017-06-27 12:08:09 +0200 |
commit | b01c848f3928dfcdf2f3d7dae1343bbe677847ef (patch) | |
tree | 7a8c70dc08c9f1bea3f7c47ee6db67c91e197429 /tests | |
parent | 55c392261a854cd219ec985cbd042e75ec0e922f (diff) | |
download | trappy-b01c848f3928dfcdf2f3d7dae1343bbe677847ef.tar.gz |
trappy/Parsing: Split trace class init into two phases
This patch set is to modify the parsing step so that we don't need to
build a raw and a formatted trace file. To do that, we need to know
which events should have raw output and which should use their default
formatting. The events indicate which are which, but currently we
generate the trace files before we populate the events.
Splitting the initialisation into two parts means that we can populate
the events so that a later patch can create the text trace with each
event either formatted or raw as required.
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Reviewed-by: KP Singh <kpsingh@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_baretrace.py | 4 | ||||
-rw-r--r-- | tests/test_ftrace.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_baretrace.py b/tests/test_baretrace.py index 33d872c..257754d 100644 --- a/tests/test_baretrace.py +++ b/tests/test_baretrace.py @@ -66,7 +66,7 @@ class TestBareTrace(unittest.TestCase): trace.add_parsed_event("load_event", self.dfr[1].copy()) basetime = self.dfr[0].index[0] - trace.normalize_time(basetime) + trace._normalize_time(basetime) expected_duration = self.dfr[1].index[-1] - basetime self.assertEquals(trace.get_duration(), expected_duration) @@ -80,7 +80,7 @@ class TestBareTrace(unittest.TestCase): prev_first_time = trace.pmu_counter.data_frame.index[0] basetime = 3 - trace.normalize_time(basetime) + trace._normalize_time(basetime) self.assertEquals(trace.basetime, basetime) diff --git a/tests/test_ftrace.py b/tests/test_ftrace.py index 1377c68..91ea8e3 100644 --- a/tests/test_ftrace.py +++ b/tests/test_ftrace.py @@ -181,14 +181,14 @@ class TestFTrace(BaseTestThermal): def test_ftrace_normalize_time(self): - """FTrace().normalize_time() works accross all classes""" + """FTrace()._normalize_time() works accross all classes""" trace = trappy.FTrace(normalize_time=False) prev_inpower_basetime = trace.cpu_in_power.data_frame.index[0] prev_inpower_last = trace.cpu_in_power.data_frame.index[-1] - trace.normalize_time() + trace._normalize_time() self.assertEquals(round(trace.thermal.data_frame.index[0], 7), 0) |