mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
tracers: buffer-lateness: display some stats about late buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1437>
This commit is contained in:
parent
d5740ea844
commit
33a1d8de3d
1 changed files with 11 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import argparse
|
||||
import csv
|
||||
import re
|
||||
import statistics
|
||||
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
|
@ -73,6 +74,16 @@ for (i, (pad, values)) in enumerate(pads.items()):
|
|||
color = colors[i],
|
||||
)
|
||||
|
||||
late = [x[1] for x in values['lateness'] if x[2]]
|
||||
n_late = len(late)
|
||||
n_buffers = len(values['lateness'])
|
||||
|
||||
print("{} late buffers: {}/{} ratio: {:.2f}% min: {} max: {} mean: {}".format(
|
||||
pad, n_late, n_buffers, (n_late / n_buffers) * 100,
|
||||
min(late) if n_late > 0 else "",
|
||||
max(late) if n_late > 0 else "",
|
||||
statistics.mean(late) if n_late > 0 else ""))
|
||||
|
||||
if not args.no_latency:
|
||||
ax1.plot(
|
||||
[x[0] for x in values['latency']],
|
||||
|
|
Loading…
Reference in a new issue