mirror of
https://github.com/ARM-software/devlib.git
synced 2025-04-17 07:10:03 +01:00
gfxinfo fixes
- Make sure timestamps are actually reported in microseconds. - Eliminate duplicate entries from successive dumps
This commit is contained in:
parent
9f666320f3
commit
4593d8605d
@ -97,7 +97,7 @@ class DerivedGfxInfoStats(DerivedFpsStats):
|
|||||||
|
|
||||||
if frame_count:
|
if frame_count:
|
||||||
duration = end_vsync - start_vsync
|
duration = end_vsync - start_vsync
|
||||||
fps = (1e9 * frame_count) / float(duration)
|
fps = (1e6 * frame_count) / float(duration)
|
||||||
else:
|
else:
|
||||||
duration = 0
|
duration = 0
|
||||||
fps = 0
|
fps = 0
|
||||||
@ -116,7 +116,7 @@ class DerivedGfxInfoStats(DerivedFpsStats):
|
|||||||
data = pd.read_csv(measurements_csv.path)
|
data = pd.read_csv(measurements_csv.path)
|
||||||
data = data[data.Flags_flags == 0]
|
data = data[data.Flags_flags == 0]
|
||||||
frame_time = data.FrameCompleted_time_us - data.IntendedVsync_time_us
|
frame_time = data.FrameCompleted_time_us - data.IntendedVsync_time_us
|
||||||
per_frame_fps = (1e9 / frame_time)
|
per_frame_fps = (1e6 / frame_time)
|
||||||
keep_filter = per_frame_fps > self.drop_threshold
|
keep_filter = per_frame_fps > self.drop_threshold
|
||||||
per_frame_fps = per_frame_fps[keep_filter]
|
per_frame_fps = per_frame_fps[keep_filter]
|
||||||
per_frame_fps.name = 'fps'
|
per_frame_fps.name = 'fps'
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import division
|
||||||
from devlib.instrument import (Instrument, CONTINUOUS,
|
from devlib.instrument import (Instrument, CONTINUOUS,
|
||||||
MeasurementsCsv, MeasurementType)
|
MeasurementsCsv, MeasurementType)
|
||||||
from devlib.utils.rendering import (GfxinfoFrameCollector,
|
from devlib.utils.rendering import (GfxinfoFrameCollector,
|
||||||
|
@ -195,6 +195,7 @@ class GfxinfoFrameCollector(FrameCollector):
|
|||||||
def _process_raw_file(self, fh):
|
def _process_raw_file(self, fh):
|
||||||
found = False
|
found = False
|
||||||
try:
|
try:
|
||||||
|
last_vsync = 0
|
||||||
while True:
|
while True:
|
||||||
for line in fh:
|
for line in fh:
|
||||||
if line.startswith('---PROFILEDATA---'):
|
if line.startswith('---PROFILEDATA---'):
|
||||||
@ -205,7 +206,11 @@ class GfxinfoFrameCollector(FrameCollector):
|
|||||||
for line in fh:
|
for line in fh:
|
||||||
if line.startswith('---PROFILEDATA---'):
|
if line.startswith('---PROFILEDATA---'):
|
||||||
break
|
break
|
||||||
self.frames.append(map(int, line.strip().split(',')[:-1])) # has a trailing ','
|
entries = map(int, line.strip().split(',')[:-1]) # has a trailing ','
|
||||||
|
if entries[1] <= last_vsync:
|
||||||
|
continue # repeat frame
|
||||||
|
last_vsync = entries[1]
|
||||||
|
self.frames.append(entries)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
pass
|
pass
|
||||||
if not found:
|
if not found:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user