mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 10:55:33 -06:00
Subtract time spend in callbacks from total
Since this is not time spent on the simulation itself, it is "unfair" that this is accounted on the simulator.
This commit is contained in:
parent
37906058f5
commit
d3db4922b4
@ -419,6 +419,8 @@ namespace Opm
|
||||
double ptime = 0.0;
|
||||
Opm::time::StopWatch transport_timer;
|
||||
double ttime = 0.0;
|
||||
Opm::time::StopWatch callback_timer;
|
||||
double time_in_callbacks = 0.0;
|
||||
Opm::time::StopWatch step_timer;
|
||||
Opm::time::StopWatch total_timer;
|
||||
total_timer.start();
|
||||
@ -597,7 +599,10 @@ namespace Opm
|
||||
}
|
||||
|
||||
// notify all clients that we are done with the timestep
|
||||
callback_timer.start ();
|
||||
timestep_completed ();
|
||||
callback_timer.stop ();
|
||||
time_in_callbacks += callback_timer.secsSinceStart ();
|
||||
}
|
||||
|
||||
if (output_) {
|
||||
@ -623,7 +628,7 @@ namespace Opm
|
||||
SimulatorReport report;
|
||||
report.pressure_time = ptime;
|
||||
report.transport_time = ttime;
|
||||
report.total_time = total_timer.secsSinceStart();
|
||||
report.total_time = total_timer.secsSinceStart() - time_in_callbacks;
|
||||
return report;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user