Commit f1e74247 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

updated statistics for product loading

parent c1306e15
......@@ -32,7 +32,6 @@ struct ParallelEventProcessorStatistics {
double acc_event_processing_time = 0.0; // accumulated time, in the user callback function, in seconds
double acc_product_loading_time = 0.0; // accumulated product loading time, in seconds
Statistics<double,double> processing_time_stats; // statistics on single-event processing times
Statistics<double,double> product_loading_time_stats; // statistics on single-event product loading times
Statistics<double,double> waiting_time_stats; // statictics on time spent waiting for new events to be in the queue
};
......
......@@ -245,6 +245,8 @@ struct ParallelEventProcessorImpl : public tl::provider<ParallelEventProcessorIm
ProductCache& cache) {
if(m_product_keys.size() == 0) return;
double t1 = tl::timer::wtime();
size_t pks = 0;
for(const auto& product_key : m_product_keys)
pks += product_key.size() + sizeof(EventDescriptor);
......@@ -353,12 +355,15 @@ struct ParallelEventProcessorImpl : public tl::provider<ParallelEventProcessorIm
offset += packed_value_sizes[i];
}
}
double t2 = tl::timer::wtime();
if(m_stats) m_stats->acc_product_loading_time += t2-t1;
}
void processSingleEvent(const EventDescriptor& d,
const ParallelEventProcessor::EventProcessingWithCacheFn& user_function,
ProductCache& cache) {
double t1, t2, t3;
double t1, t2;
t1 = tl::timer::wtime();
Event event = Event::fromDescriptor(DataStore(m_datastore), d, false);
user_function(event, cache);
......
......@@ -89,7 +89,6 @@ void ParallelMPITest::testParallelEventProcessor() {
<< " acc_event_processing_time = " << stats.acc_event_processing_time << "\n"
<< " acc_product_loading_time = " << stats.acc_product_loading_time << "\n"
<< " processing_time_stats = " << stats.processing_time_stats << "\n"
<< " product_loading_time_stats = " << stats.product_loading_time_stats << "\n"
<< " waiting_time_stats = " << stats.waiting_time_stats << std::endl;
if(rank != 0) {
......@@ -164,7 +163,6 @@ void ParallelMPITest::testParallelEventProcessorAsync() {
<< " acc_event_processing_time = " << stats.acc_event_processing_time << "\n"
<< " acc_product_loading_time = " << stats.acc_product_loading_time << "\n"
<< " processing_time_stats = " << stats.processing_time_stats << "\n"
<< " product_loading_time_stats = " << stats.product_loading_time_stats << "\n"
<< " waiting_time_stats = " << stats.waiting_time_stats << std::endl;
if(rank != 0) {
......@@ -236,7 +234,6 @@ void ParallelMPITest::testParallelEventProcessorWithProducts() {
<< " acc_event_processing_time = " << stats.acc_event_processing_time << "\n"
<< " acc_product_loading_time = " << stats.acc_product_loading_time << "\n"
<< " processing_time_stats = " << stats.processing_time_stats << "\n"
<< " product_loading_time_stats = " << stats.product_loading_time_stats << "\n"
<< " waiting_time_stats = " << stats.waiting_time_stats << std::endl;
if(rank != 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment