summaryrefslogtreecommitdiffstats
path: root/include/framework/scheduling/statistics.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-01-30 15:31:03 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2024-01-30 15:31:03 -0500
commitf24fdf2fd310a5f868e15cd9682ca37d740c77af (patch)
treeb637160ce464dc05104e4ce2968e0568f550567c /include/framework/scheduling/statistics.h
parent4aa907d6275b1b74be87ed2f2e94d8a2719a6a97 (diff)
downloaddynamic-extension-f24fdf2fd310a5f868e15cd9682ca37d740c77af.tar.gz
Benchmarking updates
Diffstat (limited to 'include/framework/scheduling/statistics.h')
-rw-r--r--include/framework/scheduling/statistics.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/include/framework/scheduling/statistics.h b/include/framework/scheduling/statistics.h
index 8466ffc..50ba196 100644
--- a/include/framework/scheduling/statistics.h
+++ b/include/framework/scheduling/statistics.h
@@ -67,19 +67,33 @@ public:
if (type == 1) {
m_type_1_cnt.fetch_add(1);
m_type_1_total_time.fetch_add(length);
+
+ if (length > m_type_1_largest_time) {
+ m_type_1_largest_time.store(length);
+ }
} else {
m_type_2_cnt.fetch_add(1);
m_type_2_total_time.fetch_add(length);
+
+ if (length > m_type_2_largest_time) {
+ m_type_2_largest_time.store(length);
+ }
}
}
void print_statistics() {
- fprintf(stdout, "Query Count: %ld\tQuery Avg. Latency: %ld\n",
- m_type_1_cnt.load(),
- m_type_1_total_time.load() / m_type_1_cnt.load());
- fprintf(stdout, "Reconstruction Count: %ld\tReconstruction Avg. Latency: %ld\n",
- m_type_2_cnt.load(),
- m_type_2_total_time.load() / m_type_2_cnt.load());
+ if (m_type_1_cnt > 0) {
+ fprintf(stdout, "Query Count: %ld\tQuery Avg. Latency: %ld\tMax Query Latency: %ld\n",
+ m_type_1_cnt.load(),
+ m_type_1_total_time.load() / m_type_1_cnt.load(),
+ m_type_1_largest_time.load());
+ }
+ if (m_type_2_cnt > 0) {
+ fprintf(stdout, "Reconstruction Count: %ld\tReconstruction Avg. Latency: %ld\tMax Recon. Latency:%ld\n",
+ m_type_2_cnt.load(),
+ m_type_2_total_time.load() / m_type_2_cnt.load(),
+ m_type_2_largest_time.load());
+ }
}
private:
@@ -92,5 +106,8 @@ private:
std::atomic<size_t> m_type_2_cnt;
std::atomic<size_t> m_type_2_total_time;
+
+ std::atomic<size_t> m_type_1_largest_time;
+ std::atomic<size_t> m_type_2_largest_time;
};
}