MCPcopy Create free account
hub / github.com/antirez/ds4 / parse_int

Function parse_int

ds4_bench.c:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63static double bench_now_sec(void) {
64 struct timespec ts;
65 clock_gettime(CLOCK_MONOTONIC, &ts);
66 return (double)ts.tv_sec + (double)ts.tv_nsec / 1000000000.0;
67}
68
69static uint64_t bench_snapshot_max_bytes(void) {
70 const char *env = getenv("DS4_BENCH_SNAPSHOT_MAX_BYTES");
71 if (!env || env[0] == '\0') return DS4_BENCH_DEFAULT_SNAPSHOT_MAX_BYTES;
72 if (!strcmp(env, "unlimited") || !strcmp(env, "UNLIMITED") ||
73 !strcmp(env, "inf") || !strcmp(env, "INF")) {
74 return UINT64_MAX;
75 }

Callers 1

parse_optionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected