MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / time_func

Function time_func

deps/jemalloc/test/stress/microbench.c:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "test/jemalloc_test.h"
2
3static inline void
4time_func(timedelta_t *timer, uint64_t nwarmup, uint64_t niter,
5 void (*func)(void)) {
6 uint64_t i;
7
8 for (i = 0; i < nwarmup; i++) {
9 func();
10 }
11 timer_start(timer);
12 for (i = 0; i < niter; i++) {
13 func();
14 }
15 timer_stop(timer);
16}
17
18void
19compare_funcs(uint64_t nwarmup, uint64_t niter, const char *name_a,

Callers 1

compare_funcsFunction · 0.70

Calls 2

timer_startFunction · 0.50
timer_stopFunction · 0.50

Tested by

no test coverage detected