Skip to content

Commit

Permalink
ctf: Take clock frequency into account in readTraces test
Browse files Browse the repository at this point in the history
[Changed] Handle different clock frequency in TraceReadAllTracesTest

Signed-off-by: Arnaud Fiorini <fiorini.arnaud@gmail.com>
Change-Id: I3c8cf65bacadab3265a87b58ce9405394db787d0
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/203298
Tested-by: Marco Miller <marco.miller@ericsson.com>
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
arfio authored and MatthewKhouzam committed Jul 25, 2023
1 parent 935bc75 commit cb97334
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -103,7 +103,7 @@ public void readTraces() {
}
}
assertEquals("Event count", fTraceEnum.getNbEvents(), count);
assertEquals("Trace duration", fTraceEnum.getDuration(), (end - start) / 1000000000.0, 1.0);
assertEquals("Trace duration", fTraceEnum.getDuration(), ((end - start) * reader.getTrace().getClock().getClockScale()) / 1000000000.0, 1.0);
} catch (CTFException e) {
fail(fTraceEnum.name() + " " + e.getMessage());
}
Expand Down

0 comments on commit cb97334

Please sign in to comment.