summaryrefslogtreecommitdiffstats
path: root/include/framework/DynamicExtension.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-01-19 15:58:04 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2024-01-19 15:58:04 -0500
commit38693c342558628c75e0ab0d23c32a95a499ed8b (patch)
treef193ff1990ea7976a8ceb5d3bf69d677d3e8ee7d /include/framework/DynamicExtension.h
parent138c793b0a58577713d98c98bb140cf1d9c79bee (diff)
downloaddynamic-extension-38693c342558628c75e0ab0d23c32a95a499ed8b.tar.gz
Initial rough-out of internal statistics tracker
Need to figure out the best way to do the detailed tracking in a concurrent manner. I was thinking just an event log, with parsing routines for extracting statistics. But that'll be pretty slow.
Diffstat (limited to 'include/framework/DynamicExtension.h')
-rw-r--r--include/framework/DynamicExtension.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h
index 7590de2..89ee30f 100644
--- a/include/framework/DynamicExtension.h
+++ b/include/framework/DynamicExtension.h
@@ -40,6 +40,10 @@ class DynamicExtension {
typedef Epoch<R, S, Q, L> _Epoch;
typedef BufferView<R> BufView;
+ static constexpr size_t QUERY = 1;
+ static constexpr size_t RECONSTRUCTION = 2;
+
+
public:
DynamicExtension(size_t buffer_lwm, size_t buffer_hwm, size_t scale_factor, size_t memory_budget=0,
size_t thread_cnt=16)
@@ -226,6 +230,11 @@ public:
return t;
}
+
+ void print_scheduler_statistics() {
+ m_sched.print_statistics();
+ }
+
private:
SCHED m_sched;
@@ -271,7 +280,7 @@ private:
*/
epoch->start_job();
- m_sched.schedule_job(reconstruction, 0, args);
+ m_sched.schedule_job(reconstruction, 0, args, RECONSTRUCTION);
/* wait for compaction completion */
wait.get();
@@ -511,7 +520,7 @@ private:
args->compaction = false;
/* NOTE: args is deleted by the reconstruction job, so shouldn't be freed here */
- m_sched.schedule_job(reconstruction, 0, args);
+ m_sched.schedule_job(reconstruction, 0, args, RECONSTRUCTION);
}
std::future<std::vector<R>> schedule_query(void *query_parms) {
@@ -522,7 +531,7 @@ private:
args->query_parms = query_parms;
auto result = args->result_set.get_future();
- m_sched.schedule_job(async_query, 0, args);
+ m_sched.schedule_job(async_query, 0, args, QUERY);
return result;
}