From 0b32fd064e7bd91f8b85fd4c6a4cbabaf5c550ea Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 8 Jul 2012 19:00:57 -0400 Subject: [PATCH] regressions/ck_ht: Previous commit was in fact shuffled insertion. Add actual shuffled get. --- regressions/ck_ht/benchmark/serial.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/regressions/ck_ht/benchmark/serial.c b/regressions/ck_ht/benchmark/serial.c index 91ab5ce..424c0df 100644 --- a/regressions/ck_ht/benchmark/serial.c +++ b/regressions/ck_ht/benchmark/serial.c @@ -312,6 +312,22 @@ main(int argc, char *argv[]) } printf(" Serial get: %" PRIu64 " ticks\n", a / (r * keys_length)); + a = 0; + for (j = 0; j < r; j++) { + keys_shuffle(keys_index); + + s = rdtsc(); + for (i = 0; i < keys_length; i++) { + if (table_get(keys[keys_index[i]]) == NULL) { + fprintf(stderr, "ERROR: Unexpected NULL value.\n"); + exit(EXIT_FAILURE); + } + } + e = rdtsc(); + a += e - s; + } + printf(" Random get: %" PRIu64 " ticks\n", a / (r * keys_length)); + a = 0; for (j = 0; j < r; j++) { s = rdtsc();