MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / task_sync

Function task_sync

thread/test/perf_workpool.cpp:59–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static void task_sync() {
60 for (uint64_t i = 0; i < FLAGS_fires; ++i) {
61 workload(FLAGS_workload_time_us);
62 auto start = std::chrono::steady_clock::now();
63 pool->call<photon::PhotonContext>([&, start] {
64 auto end = std::chrono::steady_clock::now();
65 sum_time.fetch_add(std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count(),
66 std::memory_order_relaxed);
67 });
68 }
69}
70
71static void task_sync_in_std_context() {
72 for (uint64_t i = 0; i < FLAGS_fires; ++i) {

Callers 1

mainFunction · 0.70

Calls 2

workloadFunction · 0.70
countMethod · 0.45

Tested by

no test coverage detected