diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-09-25 16:00:30 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-09-25 16:06:43 +0200 |
commit | 067f69a56de0e0e61d423ec5aa68095aa28e3124 (patch) | |
tree | 53df05ff9cbe12d6edc618328a38cc5cc9539a9f /test | |
parent | e709dc09e61c4604821d10b81604d38616b81a0b (diff) |
Filter: Add prefix trie benchmarks
Add trie tests intended as benchmarks that use external datasets
instead of generated prefixes. As datasets are not included, they
are commented out by default.
Diffstat (limited to 'test')
-rw-r--r-- | test/birdtest.c | 6 | ||||
-rw-r--r-- | test/birdtest.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/birdtest.c b/test/birdtest.c index d739e78b..053954e1 100644 --- a/test/birdtest.c +++ b/test/birdtest.c @@ -309,6 +309,12 @@ bt_log_suite_case_result(int result, const char *fmt, ...) } } +void +bt_reset_suite_case_timer(void) +{ + clock_gettime(CLOCK_MONOTONIC, &bt_suite_case_begin); +} + int bt_test_suite_base(int (*fn)(const void *), const char *id, const void *fn_arg, int forked, int timeout, const char *dsc, ...) { diff --git a/test/birdtest.h b/test/birdtest.h index 7a0c2fc4..ad5f8f9c 100644 --- a/test/birdtest.h +++ b/test/birdtest.h @@ -32,6 +32,7 @@ extern const char *bt_test_id; void bt_init(int argc, char *argv[]); int bt_exit_value(void); +void bt_reset_suite_case_timer(void); int bt_test_suite_base(int (*test_fn)(const void *), const char *test_id, const void *test_fn_argument, int forked, int timeout, const char *dsc, ...); static inline u64 bt_random(void) { return ((u64) random() & 0xffffffff) | ((u64) random() << 32); } |