|
7a205e25
|
2021-03-18T11:08:16
|
|
bench: silence coverity complaint about a double free
False positive because we rely on xkb_components_from_rules() to initalize this
struct, but let's localize the variable anyway to shut coverity up.
libxkbcommon-1.0.3/bench/rules.c:59:9: warning[-Wanalyzer-double-free]:
double-free of kccgst.symbols
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1bd3b3c7
|
2020-11-19T00:28:37
|
|
x11: cache X11 atoms
On every keymap notify event, the keymap should be refreshed, which
fetches the required X11 atoms. A big keymap might have a few hundred of
atoms.
A profile by a user has shown this *might* be slow when some intensive
amount of keymap activity is occurring. It might also be slow on a
remote X server.
While I'm not really sure this is the actual bottleneck, caching the
atoms is easy enough and only needs a couple kb of memory, so do that.
On the added bench-x11:
Before: retrieved 2500 keymaps from X in 11.233237s
After : retrieved 2500 keymaps from X in 1.592339s
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
9e3045c7
|
2019-08-05T16:57:45
|
|
MSVC: Provide an implementation of gettimeofday()
|
|
d1e39c11
|
2019-12-28T14:11:27
|
|
test/atom: use correct format specifier for size_t
From MSVC:
test\atom.c(98): note: consider using '%zu' in the format string
test\atom.c(98): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(100): note: consider using '%zu' in the format string
test\atom.c(100): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(114): note: consider using '%zu' in the format string
test\atom.c(114): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(128): note: consider using '%zu' in the format string
test\atom.c(128): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(130): note: consider using '%zu' in the format string
test\atom.c(130): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(137): note: consider using '%zu' in the format string
test\atom.c(137): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
da4a90c1
|
2019-12-28T13:49:40
|
|
Open files in binary mode
This turns off some misfeatures on Windows, and does nothing on POSIX.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
40aab05e
|
2019-12-27T13:03:20
|
|
build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.
Every .c file should have `include "config.h"` first thing.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
c8e17eed
|
2018-07-05T18:13:14
|
|
bench: simplify the bench helpers
Trim the API a bit.
Also, just always use gettimeofday(), which is portable. Hopefully the
system clock doesn't change while a benchmark is running.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d44ba481
|
2017-07-29T22:43:08
|
|
build: remove unneeded preprocessor include flags
Better to avoid these unexpected include paths.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
fe81dcbd
|
2016-09-19T10:09:12
|
|
bench: fix compilation on hurd
Patch by Samuel Thibault.
https://github.com/xkbcommon/libxkbcommon/issues/39
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
853b7502
|
2016-09-16T09:36:27
|
|
bench/compose: tabs -> spaces
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
ea9a5bcf
|
2016-09-15T14:12:38
|
|
bench: Check for errors opening Compose file
Otherwise it can segfault e.g. running ./compose inside the bench
directory.
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
4c24f7fa
|
2016-03-15T20:42:21
|
|
test: assert/ignore some warn_unused_result's
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
3c12d671
|
2015-08-24T13:33:32
|
|
bench: Modify benchmarks for a wider range of platforms
- Add the new files bench.c and bench.h to implement a timer module.
- Implement the module with clock_gettime(), mach_absolute_time(), or
gettimeofday(), depending on a given platform.
- Replace the time measurement code of the benchmark programs with the
functions of the module.
|
|
8d58e250
|
2014-10-03T00:30:43
|
|
bench/compose: add new benchmark
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
bc3b4c08
|
2014-10-02T22:03:28
|
|
Move benchmarks from tests to their own files in bench/
The tests only contain tests, and the benchmarks are more visible.
Signed-off-by: Ran Benita <ran234@gmail.com>
|