ftrace: Homogenize timestamps conversions
Created by: valschneider
By default, the str to float conversion done when reading from csv is different from the one used when reading from the trace.txt file.
Here's an example:
-
trace.txt string timestamps: [76.402065, 80.402065, 80.001337]
-
parsed dataframe timestamps: [76.402065000000007, 80.402065000000007, 82.001337000000007]
-
csv string timestamps: [76.402065, 80.402065, 80.001337]
-
cached dataframe timestamps: [76.402064999999993, 80.402064999999993, 82.001337000000007]
To fix this, the timestamps read from the cache are rounded to microsecond precision, which results in cache-read timestamps being identical to trace-read timestamps.
Tests have also been added/tweaked to ensure this stays true.