class CQL::Performance::StatsTracker

Overview

Statistics tracking

Defined in:

performance/utilities.cr

Instance Method Summary

Instance Method Detail

def avg_time : Time::Span #

[View source]
def error_rate : Float64 #

[View source]
def errors : Int64 #

[View source]
def errors=(errors : Int64) #

[View source]
def max_time : Time::Span #

[View source]
def max_time=(max_time : Time::Span) #

[View source]
def min_time : Time::Span #

[View source]
def min_time=(min_time : Time::Span) #

[View source]
def percentile(q : Float64) : Time::Span #

Estimated q quantile of the recorded durations; zero when none are recorded. Raises ArgumentError outside 0.0..1.0.


[View source]
def percentiles : LatencyPercentiles #

p50, p95 and p99 read under one lock, so all three describe the same samples.


[View source]
def record(duration : Time::Span, error : Bool = false) #

[View source]
def reset #

[View source]
def to_h : Hash(String, String | Int64 | Float64) #

[View source]
def total_count : Int64 #

[View source]
def total_count=(total_count : Int64) #

[View source]
def total_time : Time::Span #

[View source]
def total_time=(total_time : Time::Span) #

[View source]