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

Function startBenchmarkThreads

src/redis-benchmark.cpp:981–992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979}
980
981static void startBenchmarkThreads() {
982 int i;
983 for (i = 0; i < config.num_threads; i++) {
984 benchmarkThread *t = config.threads[i];
985 if (pthread_create(&(t->thread), NULL, execBenchmarkThread, t)){
986 fprintf(stderr, "FATAL: Failed to start thread %d.\n", i);
987 exit(1);
988 }
989 }
990 for (i = 0; i < config.num_threads; i++)
991 pthread_join(config.threads[i]->thread, NULL);
992}
993
994static void benchmark(const char *title, const char *cmd, int len) {
995 client c;

Callers 2

benchmarkFunction · 0.85
mainFunction · 0.85

Calls 1

pthread_createFunction · 0.50

Tested by

no test coverage detected