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

Function initBenchmarkThreads

src/keydb-diagnostic-tool.cpp:625–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625static void initBenchmarkThreads() {
626 int i;
627 if (config.threads) freeBenchmarkThreads();
628 config.threads = (benchmarkThread**)zmalloc(config.max_threads * sizeof(benchmarkThread*), MALLOC_LOCAL);
629 for (i = 0; i < config.max_threads; i++) {
630 benchmarkThread *thread = createBenchmarkThread(i);
631 config.threads[i] = thread;
632 }
633}
634
635/* Thread functions. */
636

Callers 1

mainFunction · 0.70

Calls 3

zmallocFunction · 0.85
freeBenchmarkThreadsFunction · 0.70
createBenchmarkThreadFunction · 0.70

Tested by

no test coverage detected