added more metrics to statement_cache

This commit is contained in:
2025-08-11 20:51:13 +02:00
parent 01d7179604
commit 6ac3f80887
3 changed files with 35 additions and 52 deletions
+5 -7
View File
@@ -15,8 +15,8 @@ namespace matador::sql {
class connection_pool;
struct statement_event {
std::string sql;
std::chrono::steady_clock::time_point timestamp;
std::string sql{};
std::chrono::steady_clock::time_point timestamp{};
};
struct statement_accessed_event : statement_event {};
@@ -24,17 +24,15 @@ struct statement_added_event : statement_event {};
struct statement_evicted_event : statement_event {};
struct statement_lock_failed_event : statement_event {
std::chrono::steady_clock::time_point lock_attempt_start;
std::chrono::nanoseconds duration{};
};
struct statement_lock_acquired_event : statement_event {
std::chrono::steady_clock::time_point lock_attempt_start;
std::chrono::steady_clock::time_point lock_attempt_end;
std::chrono::nanoseconds duration{};
};
struct statement_execution_event : statement_event {
std::chrono::steady_clock::time_point execution_start;
std::chrono::steady_clock::time_point execution_end;
std::chrono::nanoseconds duration{};
};
struct statement_cache_config {