bench/bench.c


Log

Author Commit Date CI Message
Pierre Le Marre e1892266 2025-02-13T16:57:46 clang-tidy: Miscellaneous fixes
Ran Benita e120807b 2025-01-29T15:35:22 Update license notices to SDPX short identifiers + update LICENSE Fix #628. Signed-off-by: Ran Benita <ran@unusedvar.com>
Pierre Le Marre 842497d9 2025-01-22T16:46:11 clang-tidy: Fix implicit or incorrect integer casts
Pierre Le Marre 0c940827 2025-01-22T16:39:35 clang-tidy: Macro arguments should be enclosed in parentheses
Pierre Le Marre f6f30c6b 2023-09-25T12:07:58 Add benchark for compile-keymap Implement `tasty-bench` method: 1. Set n = 1. 2. Measure execution time t_n of n iterations and execution time t_2n of 2n iterations. 3. Find t which minimizes deviation of (n·t, 2·n·t) from (t_n, t_2n), namely t = (t_n + 2·t_2n)/5n. 4. If deviation is small enough (see --stdev CLI parameter), return t as a mean execution time. 5. Otherwise set n = 2·n and jump back to Step 2. See: https://hackage.haskell.org/package/tasty-bench
Ran Benita bd79a960 2023-04-11T23:24:47 Possible fix for non-MSVC windows compilers `_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: https://github.com/xkbcommon/libxkbcommon/issues/305 Signed-off-by: Ran Benita <ran@unusedvar.com>
Adrian Perez de Castro 9e3045c7 2019-08-05T16:57:45 MSVC: Provide an implementation of gettimeofday()
Ran Benita 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>
Ran Benita 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>
Ran Benita 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>
Ran Benita 4c24f7fa 2016-03-15T20:42:21 test: assert/ignore some warn_unused_result's Signed-off-by: Ran Benita <ran234@gmail.com>
Kazunobu Kuriyama 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.