Skip to content

Commit

Permalink
Disable benchmarking.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadden committed Sep 14, 2020
1 parent e5def6e commit 56188bc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
8 changes: 4 additions & 4 deletions unit_tests/flow/for_each.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,10 @@ TEST_CASE("item list", "[for_each][list]")
REQUIRE(call_count == 3);

// Also do some benchmarking while we're here.
BENCHMARK("stable list for_each")
{
refresh_system(sys);
};
// BENCHMARK("stable list for_each")
// {
// refresh_system(sys);
// };

std::reverse(container.begin(), container.end());

Expand Down
8 changes: 4 additions & 4 deletions unit_tests/signals/operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ TEST_CASE("vector subscript", "[signals][operators]")
auto c_signal = direct(c);
auto s = c_signal[value(1)];

BENCHMARK("subscript signal creation")
{
return c_signal[value(1)];
};
// BENCHMARK("subscript signal creation")
// {
// return c_signal[value(1)];
// };

typedef decltype(s) signal_t;
REQUIRE((std::is_same<signal_t::value_type, int>::value));
Expand Down
41 changes: 21 additions & 20 deletions unit_tests/signals/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,29 +149,30 @@ TEST_CASE("state changes and component dirtying", "[signals][state]")
REQUIRE(log.str() == "clean;12;clean;12;writing;dirty;13;clean;13;");

// And some benchmarking...
BENCHMARK("deep state changes")
{
refresh_system(sys);
// BENCHMARK("deep state changes")
// {
// refresh_system(sys);

my_state_change_event e;
dispatch_event(sys, e);
};
// my_state_change_event e;
// dispatch_event(sys, e);
// };
}

TEST_CASE("get_state benchmarks", "[signals][state]")
{
BENCHMARK("get_state")
{
alia::system sys;
initialize_system(sys, [&](context ctx) {
scoped_component_container srr(ctx);
// The get_state call is all we really want to benchmark, but
// somehow, invoking the BENCHMARK macro inside component code
// causes a stack overflow, so we just repeat it many times so that
// it dominates the results.
for (int i = 0; i != 20; ++i)
get_state(ctx, 12);
});
refresh_system(sys);
};
// BENCHMARK("get_state")
// {
// alia::system sys;
// initialize_system(sys, [&](context ctx) {
// scoped_component_container srr(ctx);
// // The get_state call is all we really want to benchmark, but
// // somehow, invoking the BENCHMARK macro inside component code
// // causes a stack overflow, so we just repeat it many times so
// that
// // it dominates the results.
// for (int i = 0; i != 20; ++i)
// get_state(ctx, 12);
// });
// refresh_system(sys);
// };
}

0 comments on commit 56188bc

Please sign in to comment.