| 57 | } |
| 58 | |
| 59 | static 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 | |
| 71 | static void task_sync_in_std_context() { |
| 72 | for (uint64_t i = 0; i < FLAGS_fires; ++i) { |