test: add key processing benchmark
authorRan Benita <ran234@gmail.com>
Wed, 24 Oct 2012 21:27:40 +0000 (23:27 +0200)
committerRan Benita <ran234@gmail.com>
Wed, 24 Oct 2012 21:27:40 +0000 (23:27 +0200)
commitc1c1b720b0df5e348c812990d5e43d71f2847f06
treee161ee4a998647072085e5e8ffb4d95aba23f9e9
parent6f093ad56b88488b95dc8bb543be89b7da9c25ee
test: add key processing benchmark

This runs a bunch of random keys against xkb_state_update_key() and
xkb_state_key_get_one_sym(), in a fairly unintelligent way.

It might be nice to check when modifying this code path, or changing it,
to see things haven't slowed down considerably. However, given the
numbers this benchmark gives, it is pretty clear that we are not going
to be the bottleneck for anything. So this can more-or-less be ignored.

Incidentally, this also turned out to be a poor man's fuzzer, because it
turned up the fix in the previous commit. Maybe we should consider
beefing it up with an actual 'break stuff' intention and running it as
part of 'make check'.

Signed-off-by: Ran Benita <ran234@gmail.com>
Makefile.am
test/.gitignore
test/bench-key-proc.c [new file with mode: 0644]