Commit Graph

8 Commits (1a4a89a749100db97cc00cef0c79ee2eceda4c69)

Author SHA1 Message Date
Ran Benita eb59a1c55b bench/compose: fix compose file path
Forgotten in e2465c2.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-06-10 17:13:57 +03:00
Ran Benita da4a90c13e 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>
2019-12-28 13:49:40 +02:00
Ran Benita 40aab05e77 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>
2019-12-27 13:09:11 +02:00
Ran Benita c8e17eede5 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>
2018-07-05 18:29:39 +03:00
Ran Benita 853b7502f4 bench/compose: tabs -> spaces
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-09-16 09:36:27 +03:00
Bryce Harrington ea9a5bcfd7 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>
2016-09-16 09:23:43 +03:00
Kazunobu Kuriyama 3c12d671cc 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.
2015-08-28 20:02:26 +09:00
Ran Benita 8d58e250b0 bench/compose: add new benchmark
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-05 12:56:46 +03:00