Commit 7f20be7a authored by Simon Spannagel's avatar Simon Spannagel
Browse files

ModuleManager: only calculate event time when plotting - only used then

(cherry picked from commit c65f3806)
parent c31af9b2
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -814,17 +814,14 @@ void ModuleManager::run(RandomNumberGenerator& seeder) {
                // Reset logging
                ModuleManager::set_module_after(old_settings);

                if(plot) {
                    // Update execution time
                    auto end = std::chrono::steady_clock::now();
                    auto duration = static_cast<std::chrono::duration<long double>>(end - start).count();

                /*{
                    std::lock_guard<std::mutex> stat_lock{event->stats_mutex_};
                    event_time += duration;
                    this->module_execution_time_[module.get()] += duration;
                  }*/

                if(plot) {
                    this->module_event_time_[module.get()]->Fill(static_cast<double>(duration));
                }