aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_timer_perf.c
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2023-12-13 11:18:26 +0200
committerMatias Elo <matias.elo@nokia.com>2023-12-13 13:34:47 +0200
commit47fb70725fcaa0cd45d4d4cecce600f6f44a3e15 (patch)
tree4932f200c9eba9ad904291d24f8e5b626389de50 /test/performance/odp_timer_perf.c
parent26bae362b66e113f4e7dc8e5c18cecab4a6da1dc (diff)
test: timer_perf: fix thread activity check
To avoid division by zero in result print, check the value used in division instead of number of rounds. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'test/performance/odp_timer_perf.c')
-rw-r--r--test/performance/odp_timer_perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/performance/odp_timer_perf.c b/test/performance/odp_timer_perf.c
index 11a3c7864..5abee1988 100644
--- a/test/performance/odp_timer_perf.c
+++ b/test/performance/odp_timer_perf.c
@@ -1095,7 +1095,7 @@ static void print_stat_set_cancel_mode(test_global_t *global)
printf(" 1 2 3 4 5 6 7 8 9 10");
for (i = 0; i < ODP_THREAD_COUNT_MAX; i++) {
- if (global->stat[i].rounds) {
+ if (global->stat[i].sets) {
if ((num % 10) == 0)
printf("\n ");
@@ -1152,7 +1152,7 @@ static void print_stat_expire_mode(test_global_t *global)
printf(" 1 2 3 4 5 6 7 8 9 10");
for (i = 0; i < ODP_THREAD_COUNT_MAX; i++) {
- if (global->stat[i].rounds) {
+ if (global->stat[i].events) {
if ((num % 10) == 0)
printf("\n ");