rulescomp: Fix benchmark runs 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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/test/rulescomp.c b/test/rulescomp.c
index 1c084e2..6a5fcf1 100644
--- a/test/rulescomp.c
+++ b/test/rulescomp.c
@@ -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;