From fe27f131b13517cc8d989d10ee2554f27183462d Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:14:22 +0800 Subject: [PATCH] feat update --- src/system/fiber/fiber_bench.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/system/fiber/fiber_bench.cc b/src/system/fiber/fiber_bench.cc index cde9f0e..2908d26 100644 --- a/src/system/fiber/fiber_bench.cc +++ b/src/system/fiber/fiber_bench.cc @@ -3,12 +3,11 @@ #include static void -SingleQueue(benchmark::State &state) +FiberSingleQueue(benchmark::State &state) { for (auto _ : state) { state.PauseTiming(); - sled::Scheduler scheduler( - sled::Scheduler::Config().setWorkerThreadCount(0)); + sled::Scheduler scheduler(sled::Scheduler::Config().setWorkerThreadCount(0)); scheduler.bind(); defer(scheduler.unbind()); const int num_tasks = state.range(0); @@ -29,7 +28,7 @@ SingleQueue(benchmark::State &state) } static void -MultiQueue(benchmark::State &state) +FiberMultiQueue(benchmark::State &state) { for (auto _ : state) { @@ -55,5 +54,5 @@ MultiQueue(benchmark::State &state) } } -BENCHMARK(MultiQueue)->RangeMultiplier(10)->Range(10, 10000); -BENCHMARK(SingleQueue)->RangeMultiplier(10)->Range(10, 10000); +BENCHMARK(FiberSingleQueue)->RangeMultiplier(10)->Range(10, 10000); +BENCHMARK(FiberMultiQueue)->RangeMultiplier(10)->Range(10, 10000);