jfjoch_process: Add mean time for each image analysis step
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 8m48s
Build Packages / build:rpm (rocky9_nocuda) (push) Failing after 8m47s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Failing after 10m12s
Build Packages / Generate python client (push) Successful in 34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Failing after 10m53s
Build Packages / Build documentation (push) Successful in 29s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8) (push) Failing after 14m27s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 14m49s
Build Packages / build:rpm (rocky9) (push) Failing after 14m50s
Build Packages / build:rpm (rocky9_sls9) (push) Failing after 14m55s
Build Packages / Unit tests (push) Failing after 7m20s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 9m27s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Failing after 7m32s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 10m54s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Failing after 6m35s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Failing after 8m5s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Failing after 7m54s
Build Packages / Build documentation (pull_request) Successful in 57s
Build Packages / Generate python client (pull_request) Successful in 1m13s
Build Packages / Create release (pull_request) Has been skipped
Build Packages / build:rpm (rocky8_sls9) (pull_request) Failing after 10m46s
Build Packages / build:rpm (rocky8) (pull_request) Failing after 10m56s
Build Packages / Unit tests (pull_request) Failing after 7m46s
Build Packages / build:rpm (ubuntu2404) (pull_request) Failing after 10m54s
Build Packages / build:rpm (rocky9) (pull_request) Failing after 13m59s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Failing after 14m46s
Build Packages / build:rpm (ubuntu2204) (pull_request) Failing after 13m33s

This commit is contained in:
2026-03-26 15:43:04 +01:00
parent 0eacee0801
commit 351b4f0070
3 changed files with 37 additions and 5 deletions
+15 -4
View File
@@ -109,7 +109,7 @@ void JFJochReceiverPlots::Setup(const DiffractionExperiment &experiment, const A
refinement_time.Clear(r);
spot_finding_time.Clear(r);
integration_time.Clear(r);
processing_time.Clear(r);
total_processing_time.Clear(r);
indexing_time.Clear(r);
bragg_prediction_time.Clear(r);
}
@@ -135,7 +135,7 @@ void JFJochReceiverPlots::Add(const DataMessage &msg, const AzimuthalIntegration
max_value.AddElement(msg.number, msg.max_viable_pixel_value);
indexing_time.AddElement(msg.number, msg.indexing_time_s);
processing_time.AddElement(msg.number, msg.processing_time_s);
total_processing_time.AddElement(msg.number, msg.processing_time_s);
spot_finding_time.AddElement(msg.number, msg.spot_finding_time_s);
integration_time.AddElement(msg.number, msg.integration_time_s);
refinement_time.AddElement(msg.number, msg.refinement_time_s);
@@ -360,7 +360,7 @@ MultiLinePlot JFJochReceiverPlots::GetPlots(const PlotRequest &request) {
bragg_prediction.title = "bragg prediction";
ret.AddPlot(bragg_prediction);
auto total = processing_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
auto total = total_processing_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
total.title = "total";
ret.AddPlot(total);
@@ -401,6 +401,17 @@ std::optional<float> JFJochReceiverPlots::GetBkgEstimate() const {
return {};
}
MeanProcessingTime JFJochReceiverPlots::GetMeanProcessingTime() const {
MeanProcessingTime ret{};
ret.spot_finding = spot_finding_time.Mean();
ret.indexing = indexing_time.Mean();
ret.integration = integration_time.Mean();
ret.refinement = refinement_time.Mean();
ret.bragg_prediction = bragg_prediction_time.Mean();
ret.processing = total_processing_time.Mean();
return ret;
}
void JFJochReceiverPlots::GetXFELPulseID(std::vector<uint64_t> &v) const {
std::unique_lock ul(m);
v = xfel_pulse_id.vec();
@@ -534,7 +545,7 @@ void JFJochReceiverPlots::GetPlotRaw(std::vector<float> &v, PlotType type, const
v = pixel_sum.ExportArray();
break;
case PlotType::ImageProcessingTime:
v = processing_time.ExportArray();
v = total_processing_time.ExportArray();
break;
case PlotType::RefinementBeamX:
v = beam_center_x.ExportArray();
+12 -1
View File
@@ -18,6 +18,15 @@
#include "../common/Plot.h"
#include "../common/ScanResult.h"
struct MeanProcessingTime {
float spot_finding;
float indexing;
float refinement;
float integration;
float bragg_prediction;
float processing;
};
class JFJochReceiverPlots {
mutable std::mutex m; // protects xfel_pulse_id, xfel_event_code and az_int_profile
@@ -77,7 +86,7 @@ class JFJochReceiverPlots {
StatusVector refinement_time;
StatusVector integration_time;
StatusVector bragg_prediction_time;
StatusVector processing_time;
StatusVector total_processing_time;
MultiLinePlot GetROIPlot(PlotType type, int64_t nbins, float start, float incr,
const std::optional<float> &fill_value) const;
@@ -97,6 +106,8 @@ public:
std::vector<float> GetAzIntProfile() const;
MultiLinePlot GetAzIntProfilePlot(bool force_1d = false, PlotAzintUnit azint_unit = PlotAzintUnit::Q_recipA) const;
MeanProcessingTime GetMeanProcessingTime() const;
void GetPlotRaw(std::vector<float> &v, PlotType type, const std::string &roi);
};
+10
View File
@@ -725,6 +725,16 @@ int main(int argc, char **argv) {
if (!end_msg.indexing_rate.has_value()) {
logger.Info("Indexing rate: {:.2f}%", end_msg.indexing_rate.value() * 100.0);
}
auto image_mean_time = plots.GetMeanProcessingTime();
logger.Info("Per-image time: (mean; microseconds): spot finding {:.0f} indexing {:.0f} refinement {:.0f} prediction {:.0f} integration {:.0f} total {:.0f}",
image_mean_time.spot_finding * 1e6,
image_mean_time.indexing * 1e6,
image_mean_time.refinement * 1e6,
image_mean_time.bragg_prediction * 1e6,
image_mean_time.integration * 1e6,
image_mean_time.processing * 1e6);
if (rotation_indexer_ret.has_value()) {
auto latt = rotation_indexer_ret->lattice;
if (auto axis_ = experiment.GetGoniometer()) {