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

Function createBenchmarkThread

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

Source from the content-addressed store, hash-verified

635/* Thread functions. */
636
637static benchmarkThread *createBenchmarkThread(int index) {
638 benchmarkThread *thread = (benchmarkThread*)zmalloc(sizeof(*thread), MALLOC_LOCAL);
639 if (thread == NULL) return NULL;
640 thread->index = index;
641 thread->el = aeCreateEventLoop(1024*10);
642 return thread;
643}
644
645static void freeBenchmarkThread(benchmarkThread *thread) {
646 if (thread->el) aeDeleteEventLoop(thread->el);

Callers 1

initBenchmarkThreadsFunction · 0.70

Calls 2

zmallocFunction · 0.85
aeCreateEventLoopFunction · 0.85

Tested by

no test coverage detected