jfjoch_fpga_test: Add processing time per image metrics
This commit is contained in:
@@ -21,7 +21,6 @@ class MXAnalysisWithoutFPGA {
|
||||
const DiffractionExperiment &experiment;
|
||||
const AzimuthalIntegration &integration;
|
||||
|
||||
|
||||
std::vector<uint16_t> roi_map;
|
||||
std::map<std::string, uint16_t> roi_names;
|
||||
size_t roi_count;
|
||||
|
||||
@@ -194,6 +194,7 @@ JFJochReceiverOutput JFJochReceiver::GetFinalStatistics() const {
|
||||
ret.scan_result = scan_result.GetResult();
|
||||
ret.scan_result.rotation_lattice = rotation_indexing_lattice;
|
||||
ret.images_written = images_written;
|
||||
ret.processing_time = plots.GetMeanProcessingTime();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "../jungfrau/JFModulePedestal.h"
|
||||
#include "JFJochReceiverCurrentStatus.h"
|
||||
#include "JFJochReceiverPlots.h"
|
||||
#include "../common/ScanResult.h"
|
||||
|
||||
struct JFJochReceiverOutput {
|
||||
@@ -25,6 +26,7 @@ struct JFJochReceiverOutput {
|
||||
JFJochReceiverStatus status;
|
||||
std::string writer_err;
|
||||
std::optional<int64_t> images_written;
|
||||
MeanProcessingTime processing_time;
|
||||
};
|
||||
|
||||
#endif //JFJOCH_JFJOCHRECEIVEROUTPUT_H
|
||||
|
||||
@@ -342,7 +342,3 @@ JFJochReceiverService &JFJochReceiverService::Indexing(const IndexingSettings &i
|
||||
ImagePusherStatus JFJochReceiverService::GetImagePusherStatus() const {
|
||||
return image_pusher.GetStatus();
|
||||
}
|
||||
|
||||
MeanProcessingTime JFJochReceiverService::GetMeanProcessingTime() const {
|
||||
return plots.GetMeanProcessingTime();
|
||||
}
|
||||
|
||||
@@ -90,8 +90,6 @@ public:
|
||||
void ClearImageBuffer();
|
||||
|
||||
ImagePusherStatus GetImagePusherStatus() const;
|
||||
|
||||
MeanProcessingTime GetMeanProcessingTime() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -286,6 +286,14 @@ int main(int argc, char **argv) {
|
||||
static_cast<double>(nsummation * nimages * x.GetModulesNum() * RAW_MODULE_SIZE *
|
||||
x.GetBitDepthReadout() / 8) / (receiving_time * 1e9));
|
||||
|
||||
logger.Info("Per-image time: (mean; microseconds): spot finding {:.0f} indexing {:.0f} refinement {:.0f} prediction {:.0f} integration {:.0f} total {:.0f}",
|
||||
output.processing_time.spot_finding * 1e6,
|
||||
output.processing_time.indexing * 1e6,
|
||||
output.processing_time.refinement * 1e6,
|
||||
output.processing_time.bragg_prediction * 1e6,
|
||||
output.processing_time.integration * 1e6,
|
||||
output.processing_time.processing * 1e6);
|
||||
|
||||
logger.Info("");
|
||||
for (int i = 0; i < nstreams; i++) {
|
||||
auto coll_status = aq_devices[i].GetDataCollectionStatus();
|
||||
|
||||
@@ -200,12 +200,11 @@ int main(int argc, char **argv) {
|
||||
if (output.status.max_receive_delay)
|
||||
logger.Info("Max delay {}", output.status.max_receive_delay.value());
|
||||
|
||||
auto image_mean_time = service.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);
|
||||
output.processing_time.spot_finding * 1e6,
|
||||
output.processing_time.indexing * 1e6,
|
||||
output.processing_time.refinement * 1e6,
|
||||
output.processing_time.bragg_prediction * 1e6,
|
||||
output.processing_time.integration * 1e6,
|
||||
output.processing_time.processing * 1e6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user