From 98a684d157a9ea247aa6b2ea204fae16b1b2c4c1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 1 Mar 2022 08:57:32 +0100 Subject: [PATCH] Tpool: no measurements (no trials) if not measured --- common/utils/threadPool/thread-pool.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/utils/threadPool/thread-pool.h b/common/utils/threadPool/thread-pool.h index dc2655f741..d06f2195ee 100644 --- a/common/utils/threadPool/thread-pool.h +++ b/common/utils/threadPool/thread-pool.h @@ -175,6 +175,8 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) { static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t* elt) { time_stats_t ts = {0}; + if (elt->startProcessingTime == 0 && elt->endProcessingTime == 0) + return ts; /* no measurements done */ ts.in = elt->startProcessingTime; ts.diff = elt->endProcessingTime - ts.in; ts.p_time = ts.diff;