From 2ccb2e9ed4e5e412fc41d29edea688b801d75739 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 31 Mar 2011 22:34:58 -0400 Subject: [PATCH] regressions: Add percentage. --- regressions/ck_epoch/validate/ck_stack.c | 6 ++++-- regressions/ck_hp/validate/Makefile | 2 +- regressions/ck_hp/validate/ck_hp_stack.c | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/regressions/ck_epoch/validate/ck_stack.c b/regressions/ck_epoch/validate/ck_stack.c index b565525..356fc67 100644 --- a/regressions/ck_epoch/validate/ck_stack.c +++ b/regressions/ck_epoch/validate/ck_stack.c @@ -110,8 +110,10 @@ thread(void *unused CK_CC_UNUSED) ck_pr_inc_uint(&e_barrier); while (ck_pr_load_uint(&e_barrier) < n_threads); - fprintf(stderr, "Peak: %u\nReclamations: %" PRIu64 "\n\n", - record.n_peak, record.n_reclamations); + fprintf(stderr, "Peak: %u (%2.2f%%)\nReclamations: %" PRIu64 "\n\n", + record.n_peak, + (double)record.n_peak / PAIRS * 100, + record.n_reclamations); ck_epoch_purge(&record); diff --git a/regressions/ck_hp/validate/Makefile b/regressions/ck_hp/validate/Makefile index 6716d12..b7f1789 100644 --- a/regressions/ck_hp/validate/Makefile +++ b/regressions/ck_hp/validate/Makefile @@ -20,4 +20,4 @@ clean: rm -rf *~ *.o *.dSYM $(OBJECTS) include ../../../build/regressions.build -CFLAGS+=-pthread -D_GNU_SOURCE -ggdb +CFLAGS+=-pthread -D_GNU_SOURCE diff --git a/regressions/ck_hp/validate/ck_hp_stack.c b/regressions/ck_hp/validate/ck_hp_stack.c index d70f736..6b361fd 100644 --- a/regressions/ck_hp/validate/ck_hp_stack.c +++ b/regressions/ck_hp/validate/ck_hp_stack.c @@ -109,8 +109,10 @@ thread(void *unused) ck_pr_inc_uint(&e_barrier); while (ck_pr_load_uint(&e_barrier) < n_threads); - fprintf(stderr, "Peak: %u\nReclamations: %" PRIu64 "\n\n", - record.n_peak, record.n_reclamations); + fprintf(stderr, "Peak: %u (%2.2f%%)\nReclamations: %" PRIu64 "\n\n", + record.n_peak, + (double)record.n_peak / PAIRS * 100, + record.n_reclamations); ck_hp_clear(&record); ck_hp_purge(&record);