module Circed::Performance::Metrics

Overview

Performance monitoring and metrics collection Designed to be lightweight and non-intrusive

Defined in:

circed/performance/metrics.cr

Constant Summary

MAX_BURST_TIME = 5.seconds

Performance thresholds

MAX_MESSAGE_TIME = 100.milliseconds
MAX_NETSPLIT_TIME = 10.seconds

Class Method Summary

Class Method Detail

def self.command_counts : Hash(String, UInt64) #

[View source]
def self.increment_channel_operations #

[View source]
def self.increment_command(command : String) #

[View source]
def self.increment_messages(count : UInt64 = 1_u64) #

Increment message counter atomically


[View source]
def self.reset #

Reset all counters (for testing or periodic cleanup)


[View source]
def self.snapshot #

Get current metrics snapshot


[View source]
def self.time_burst(&) #

Time a block execution and categorize by operation type


[View source]
def self.time_message_processing(&) #

[View source]
def self.time_netsplit(&) #

[View source]