rulescomp: Fix benchmark runs
authorDaniel Stone <daniel@fooishbar.org>
Thu, 12 Jul 2012 23:32:41 +0000 (00:32 +0100)
committerDaniel Stone <daniel@fooishbar.org>
Thu, 12 Jul 2012 23:32:41 +0000 (00:32 +0100)
We'd accidentally inverted silent vs. non-silent compilation, which
would skew the benchmark pretty badly, but also forgot to change base to
evdev for the rules here.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
test/rulescomp.c

index 1c084e2..6a5fcf1 100644 (file)
@@ -43,8 +43,11 @@ test_rmlvo(struct xkb_context *context, const char *rules,
 
     keymap = test_compile_rules(context, rules, model, layout, variant,
                                 options);
-    if (keymap)
+    if (keymap) {
+        fprintf(stderr, "Compiled '%s' '%s' '%s' '%s' '%s'\n",
+                rules, model, layout, variant, options);
         xkb_map_unref(keymap);
+    }
 
     return keymap != NULL;
 }
@@ -58,11 +61,8 @@ test_rmlvo_silent(struct xkb_context *context, const char *rules,
 
     keymap = test_compile_rules(context, rules, model, layout, variant,
                                 options);
-    if (keymap) {
-        fprintf(stderr, "Compiled '%s' '%s' '%s' '%s' '%s'\n",
-                rules, model, layout, variant, options);
+    if (keymap)
         xkb_map_unref(keymap);
-    }
 
     return keymap != NULL;
 }
@@ -75,7 +75,7 @@ benchmark(struct xkb_context *context)
 
     clock_gettime(CLOCK_MONOTONIC, &start);
     for (i = 0; i < BENCHMARK_ITERATIONS; i++)
-        assert(test_rmlvo_silent(context, "base",       "",       "us",  "",      ""));
+        assert(test_rmlvo_silent(context, "evdev",       "",       "us",  "",      ""));
     clock_gettime(CLOCK_MONOTONIC, &stop);
 
     elapsed.tv_sec = stop.tv_sec - start.tv_sec;