Improve recording of timing for different data analysis steps
This commit is contained in:
@@ -92,6 +92,8 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In
|
||||
if (!outcome.lattice_candidate)
|
||||
return;
|
||||
|
||||
auto start_time = std::chrono::steady_clock::now();
|
||||
|
||||
XtalOptimizerData data{
|
||||
.geom = outcome.experiment.GetDiffractionGeometry(),
|
||||
.latt = *outcome.lattice_candidate,
|
||||
@@ -133,6 +135,9 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In
|
||||
msg.beam_corr_x = data.beam_corr_x;
|
||||
msg.beam_corr_y = data.beam_corr_y;
|
||||
}
|
||||
|
||||
auto end_time = std::chrono::steady_clock::now();
|
||||
msg.refinement_time_s = std::chrono::duration_cast<std::chrono::duration<double>>(end_time - start_time).count();
|
||||
}
|
||||
|
||||
void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
|
||||
@@ -184,7 +189,12 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
|
||||
.mosaicity_deg = std::fabs(mos_deg)
|
||||
};
|
||||
|
||||
auto pred_start_time = std::chrono::steady_clock::now();
|
||||
auto nrefl = prediction.Calc(outcome.experiment, latt, settings_prediction);
|
||||
auto pred_end_time = std::chrono::steady_clock::now();
|
||||
msg.bragg_prediction_time_s = std::chrono::duration<float>(pred_end_time - pred_start_time).count();
|
||||
|
||||
auto integration_start_time = std::chrono::steady_clock::now();
|
||||
auto refl_ret = BraggIntegrate2D(outcome.experiment, image, prediction.GetReflections(), nrefl, msg.number);
|
||||
|
||||
constexpr size_t kMaxReflections = 10000;
|
||||
@@ -212,6 +222,9 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
|
||||
|
||||
CalcISigma(msg);
|
||||
CalcWilsonBFactor(msg);
|
||||
auto integration_end_time = std::chrono::steady_clock::now();
|
||||
msg.integration_time_s = std::chrono::duration<float>(integration_end_time - integration_start_time).count();
|
||||
|
||||
}
|
||||
|
||||
void IndexAndRefine::ProcessImage(DataMessage &msg,
|
||||
|
||||
Reference in New Issue
Block a user