Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
performance_monitor.h File Reference
#include "../database_types.h"
#include <chrono>
#include <atomic>
#include <mutex>
#include <vector>
#include <unordered_map>
#include <memory>
#include <thread>
#include <condition_variable>
#include <functional>
#include <string>
Include dependency graph for performance_monitor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  database::monitoring::query_metrics
 Metrics for individual query execution. More...
 
struct  database::monitoring::connection_metrics
 Metrics for database connection usage. More...
 
struct  database::monitoring::performance_summary
 Aggregated performance metrics. More...
 
class  database::monitoring::performance_alert
 Alert system for performance thresholds. More...
 
class  database::monitoring::query_timer
 RAII timer for measuring query execution time. More...
 
class  database::monitoring::performance_monitor
 Main performance monitoring system. More...
 
class  database::monitoring::metrics_exporter
 Export metrics to external monitoring systems. More...
 
class  database::monitoring::prometheus_exporter
 Export metrics in Prometheus format. More...
 
class  database::monitoring::dashboard_server
 Simple HTTP server for performance dashboard. More...
 

Namespaces

namespace  database
 
namespace  database::monitoring
 

Macros

#define MONITOR_QUERY(query, db_type)
 
#define MONITOR_QUERY_RESULT(rows)
 
#define MONITOR_QUERY_ERROR(error)
 

Macro Definition Documentation

◆ MONITOR_QUERY

#define MONITOR_QUERY ( query,
db_type )
Value:
database::monitoring::query_timer timer_(query, db_type)
RAII timer for measuring query execution time.

Definition at line 335 of file performance_monitor.h.

335 #define MONITOR_QUERY(query, db_type) \
336 database::monitoring::query_timer timer_(query, db_type)

◆ MONITOR_QUERY_ERROR

#define MONITOR_QUERY_ERROR ( error)
Value:
timer_.set_error(error)

Definition at line 341 of file performance_monitor.h.

341 #define MONITOR_QUERY_ERROR(error) \
342 timer_.set_error(error)

◆ MONITOR_QUERY_RESULT

#define MONITOR_QUERY_RESULT ( rows)
Value:
timer_.set_rows_affected(rows)

Definition at line 338 of file performance_monitor.h.

338 #define MONITOR_QUERY_RESULT(rows) \
339 timer_.set_rows_affected(rows)