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

Function initBenchmarkThreads

src/redis-benchmark.cpp:971–979  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969}
970
971static void initBenchmarkThreads() {
972 int i;
973 if (config.threads) freeBenchmarkThreads();
974 config.threads = (benchmarkThread**)zmalloc(config.num_threads * sizeof(benchmarkThread*), MALLOC_LOCAL);
975 for (i = 0; i < config.num_threads; i++) {
976 benchmarkThread *thread = createBenchmarkThread(i);
977 config.threads[i] = thread;
978 }
979}
980
981static void startBenchmarkThreads() {
982 int i;

Callers 2

benchmarkFunction · 0.70
mainFunction · 0.70

Calls 3

zmallocFunction · 0.85
freeBenchmarkThreadsFunction · 0.70
createBenchmarkThreadFunction · 0.70

Tested by

no test coverage detected