summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-29 15:57:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-29 15:57:20 +0200
commitd9a3668586780594eb5260535ce45c9a0b6f1c1c (patch)
tree7e5b67fb34f2f6f0917a8b70463597580476748e
parentb061108a1e98ed1d1f869f4e71fe35373515b2a0 (diff)
logic/pipeline: debug sleep times
-rw-r--r--logic/pipeline.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 4cf52e54..9d783952 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -481,15 +481,16 @@ ok:
}
#ifdef DEBUG_TIMINGS
-static void debug_timings(float backlog_time)
+static void debug_timings(float backlog_time, int sleep_time)
{
- static variance v;
+ static variance v, v2;
static Timer t, t2;
static unsigned cnt, k;
if (k > 1000)
{
v.input((double)backlog_time);
+ v2.input(sleep_time);
if (t.elapsed_ms() >= 1000)
{
@@ -497,7 +498,9 @@ static void debug_timings(float backlog_time)
qDebug() << cnt << "Hz:"
<< "backlog"
<< "avg" << v.avg()
- << "stddev" << v.stddev();
+ << "dev" << v.stddev()
+ << "| sleep" << v2.avg()
+ << "dev" << v2.stddev();
cnt = 0;
}
@@ -565,7 +568,7 @@ void pipeline::run()
ms{0}, ms{10}).count();
#ifdef DEBUG_TIMINGS
- debug_timings(backlog_time.count());
+ debug_timings(backlog_time.count(), sleep_ms);
#endif
portable::sleep(sleep_ms);
}