mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-10 19:25:26 +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 argparse
|
||||||
import csv
|
import csv
|
||||||
import re
|
import re
|
||||||
|
import statistics
|
||||||
|
|
||||||
import matplotlib
|
import matplotlib
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
@ -73,6 +74,16 @@ for (i, (pad, values)) in enumerate(pads.items()):
|
||||||
color = colors[i],
|
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:
|
if not args.no_latency:
|
||||||
ax1.plot(
|
ax1.plot(
|
||||||
[x[0] for x in values['latency']],
|
[x[0] for x in values['latency']],
|
||||||
|
|
Loading…
Reference in a new issue