Skip to content

Commit

Permalink
benchmarks: update limits
Browse files Browse the repository at this point in the history
  • Loading branch information
nightly committed Aug 22, 2023
1 parent df31aad commit 3801914
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 61 deletions.
107 changes: 51 additions & 56 deletions bench/Synthesis/Hinge/Paper/limits_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, IGlobalCost)(benchmark::State& state)
.stage_transition_limit = 50, .stage_cost_limit = 99999,
.fairness_limit = 20 };

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
AStar as(graphs, graph_recipe, global, *topology, lim);
auto controller = as.Synthethise();
}
}

Expand All @@ -65,8 +65,8 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, IStageCost)(benchmark::State& state) {
.stage_transition_limit = 50,
.stage_cost_limit = arg, .fairness_limit = 20 };

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
AStar as(graphs, graph_recipe, global, *topology, lim);
auto controller = as.Synthethise();
}
}

Expand All @@ -89,8 +89,8 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, IStageTransitions)(benchmark::State& s
.stage_transition_limit = 50, .stage_cost_limit = 500,
.fairness_limit = 20 };

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
AStar as(graphs, graph_recipe, global, *topology, lim);
auto controller = as.Synthethise();
}
}

Expand All @@ -102,10 +102,8 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, PairCosts)(benchmark::State& state) {
.stage_transition_limit = 50, .stage_cost_limit = phase_arg,
.fairness_limit = 20 };

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
benchmark::DoNotOptimize(controller);
benchmark::ClobberMemory();
AStar as(graphs, graph_recipe, global, *topology, lim);
auto controller = as.Synthethise();
}
}

Expand All @@ -116,76 +114,73 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, PairTransitions)(benchmark::State& sta
Limits lim{ .global_transition_limit = global_arg, .global_cost_limit = 8192,
.stage_transition_limit = phase_arg, .stage_cost_limit = 500,
.fairness_limit = 20 };
GS gs(graphs, graph_recipe, global, *topology, lim);

auto controller = gs.Synthethise();
benchmark::DoNotOptimize(controller);
benchmark::ClobberMemory();
AStar as(graphs, graph_recipe, global, *topology, lim);
auto controller = as.Synthethise();
}
}

static size_t num_iterations = 1;
#define GROUP 1

#if GROUP == 1
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(400)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(450)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(500)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(600)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(700)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(800)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(900)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(1000)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(30)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(40)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(60)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(70)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(80)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalCost)->Arg(90)->Unit(benchmark::kSecond)->Iterations(num_iterations);
#endif

#if GROUP == 2
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(25)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(150)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(200)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(250)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(300)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(350)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(400)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(500)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(550)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(600)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(650)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(700)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(750)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(800)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(850)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(900)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(950)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(1000)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(25)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(150)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(200)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(250)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(300)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(350)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(400)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(500)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(550)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(600)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(650)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(700)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(750)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(800)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(850)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(900)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(950)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageCost)->Arg(1000)->Unit(benchmark::kSecond)->Iterations(num_iterations);
#endif

#if GROUP == 3
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalTransitions)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalTransitions)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalTransitions)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IGlobalTransitions)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
#endif

#if GROUP == 4
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageTransitions)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageTransitions)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageTransitions)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, IStageTransitions)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
#endif


#if GROUP == 5
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(300)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(500)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(50)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(75)->Unit(benchmark::kSecond)->Iterations(num_iterations);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairCosts)->Arg(700)->Arg(100)->Unit(benchmark::kSecond)->Iterations(num_iterations);
#endif

#if GROUP == 6
BENCHMARK_REGISTER_F(HingeControllerLimits, PairTransitions)->Arg(10)->Arg(10)->Unit(benchmark::kSecond)->Iterations(3);
BENCHMARK_REGISTER_F(HingeControllerLimits, PairTransitions)->Arg(10)->Arg(10)->Unit(benchmark::kSecond)->Iterations(3);
#endif

// ********************************************** @Notes ***********************************************************************
Expand Down
6 changes: 1 addition & 5 deletions bench/Synthesis/Hinge/Paper/limits_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, PairCosts)(benchmark::State& state) {

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
benchmark::DoNotOptimize(controller);
benchmark::ClobberMemory();
}
}

Expand All @@ -119,11 +117,9 @@ BENCHMARK_DEFINE_F(HingeControllerLimits, PairTransitions)(benchmark::State& sta
Limits lim{ .global_transition_limit = global_arg, .global_cost_limit = 8192,
.stage_transition_limit = phase_arg, .stage_cost_limit = 500,
.fairness_limit = 20 };
GS gs(graphs, graph_recipe, global, *topology, lim);

GS gs(graphs, graph_recipe, global, *topology, lim);
auto controller = gs.Synthethise();
benchmark::DoNotOptimize(controller);
benchmark::ClobberMemory();
}
}

Expand Down

0 comments on commit 3801914

Please sign in to comment.