From 7330cd5f7b9017fe13d60b9bc979d9f8fd6335fd Mon Sep 17 00:00:00 2001 From: Nora Abi Akar <nora.abiakar@gmail.com> Date: Tue, 16 Jun 2020 18:11:18 +0200 Subject: [PATCH] fix mech_vec and add profiling info to ring.cpp (#1065) Update `mech_vec.cpp` to work with the new API Print profiler summary in the ring example --- example/ring/ring.cpp | 3 +++ test/ubench/mech_vec.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/example/ring/ring.cpp b/example/ring/ring.cpp index 00a427f7..dc623b8a 100644 --- a/example/ring/ring.cpp +++ b/example/ring/ring.cpp @@ -229,6 +229,9 @@ int main(int argc, char** argv) { write_trace_json(voltage.at(0)); } + auto profile = arb::profile::profiler_summary(); + std::cout << profile << "\n"; + auto report = arb::profile::make_meter_report(meters, context); std::cout << report; } diff --git a/test/ubench/mech_vec.cpp b/test/ubench/mech_vec.cpp index 7130039c..00074224 100644 --- a/test/ubench/mech_vec.cpp +++ b/test/ubench/mech_vec.cpp @@ -269,7 +269,7 @@ void expsyn_1_branch_current(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_expsyn_1_branch, cell_to_intdom, target_handles, probe_handles); @@ -289,7 +289,7 @@ void expsyn_1_branch_state(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_expsyn_1_branch, cell_to_intdom, target_handles, probe_handles); @@ -308,7 +308,7 @@ void pas_1_branch_current(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_pas_1_branch, cell_to_intdom, target_handles, probe_handles); @@ -327,7 +327,7 @@ void pas_3_branches_current(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_pas_3_branches, cell_to_intdom, target_handles, probe_handles); @@ -346,7 +346,7 @@ void hh_1_branch_state(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_hh_1_branch, cell_to_intdom, target_handles, probe_handles); @@ -365,7 +365,7 @@ void hh_1_branch_current(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_hh_1_branch, cell_to_intdom, target_handles, probe_handles); @@ -384,7 +384,7 @@ void hh_3_branches_state(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_hh_3_branches, cell_to_intdom, target_handles, probe_handles); @@ -403,7 +403,7 @@ void hh_3_branches_current(benchmark::State& state) { std::vector<cell_gid_type> gids = {0}; std::vector<target_handle> target_handles; std::vector<fvm_index_type> cell_to_intdom; - probe_association_map<probe_handle> probe_handles; + probe_association_map probe_handles; fvm_cell cell((execution_context())); cell.initialize(gids, rec_hh_3_branches, cell_to_intdom, target_handles, probe_handles); -- GitLab