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

Function createBenchmarkThread

src/redis-benchmark.cpp:1038–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036/* Thread functions. */
1037
1038static benchmarkThread *createBenchmarkThread(int index) {
1039 benchmarkThread *thread = (benchmarkThread*)zmalloc(sizeof(*thread), MALLOC_LOCAL);
1040 if (thread == NULL) return NULL;
1041 thread->index = index;
1042 thread->el = aeCreateEventLoop(1024*10);
1043 aeCreateTimeEvent(thread->el,1,showThroughput,NULL,NULL);
1044 return thread;
1045}
1046
1047static void freeBenchmarkThread(benchmarkThread *thread) {
1048 if (thread->el) aeDeleteEventLoop(thread->el);

Callers 1

initBenchmarkThreadsFunction · 0.70

Calls 3

zmallocFunction · 0.85
aeCreateEventLoopFunction · 0.85
aeCreateTimeEventFunction · 0.85

Tested by

no test coverage detected