MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / notify_one

Function notify_one

runtime/Perf.cc:871–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869}
870
871double notify_one() {
872 int count = 1000000;
873 std::condition_variable cond;
874
875 uint64_t start = Cycles::rdtsc();
876 for (int i = 0; i < count; ++i) {
877 cond.notify_one();
878 }
879 uint64_t stop = Cycles::rdtsc();
880
881 return Cycles::toSeconds(stop - start)/count;
882}
883
884// Measure the cost of the Cylcles::toNanoseconds method.
885double perfCyclesToNanoseconds()

Callers

nothing calls this directly

Calls 1

rdtscFunction · 0.85

Tested by

no test coverage detected