Module monitoring

Source
Expand description

Zero-latency monitoring framework for HFT trading systems

This module provides a high-performance monitoring solution designed for minimal impact on trading system latency. It uses lock-free data structures, async processing, and memory-mapped files for efficient metric collection and persistence.

§Key Features

  • Lock-free ring buffers for zero-allocation metric recording
  • MPMC channels (flume) for async metric processing
  • Memory-mapped files for low-latency persistence
  • Nanosecond precision timing using quanta
  • Support for counters, gauges, histograms, and latency measurements

Re-exports§

pub use collector::MetricCollector;
pub use engine::MonitoringEngine;
pub use metrics::Counter;
pub use metrics::Gauge;
pub use metrics::Histogram;
pub use metrics::LatencyTracker;
pub use metrics::Metric;
pub use metrics::MetricType;
pub use writer::MmapWriter;

Modules§

collector
Metric collector implementation using lock-free ring buffers
engine
Monitoring engine for high-performance metrics collection and processing
metrics
Metric types and structures for the monitoring system
ring_buffer
Lock-free ring buffer implementation for zero-latency metric recording
writer
Memory-mapped file writer for efficient metric persistence
zerocopy_writer
Zero-copy structures for monitoring data persistence

Structs§

MonitoringConfig
Configuration for the monitoring system

Functions§

init_monitoring
Initialize the global monitoring system
record_metric
Record a metric with zero overhead