class Cryload::Stats::Batch

Overview

Worker-local stats batch flushed periodically to the global collector.

Defined in:

cryload/stats.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(success_status_ranges : Array(Range(Int32, Int32)) = [200..299], track_urls : Bool = false) #

Instance Method Detail


def corrected_latency : Cryload::Histogram::Sparse #


def empty? : Bool #

def error_counts : Hash(String, Int64) #

def error_messages : Hash(String, String) #


def latency_correction=(latency_correction : Bool) #

Set once by the load generator; the batch needs it to pick which latency feeds the per-URL histogram.


def latency_correction? : Bool #

Set once by the load generator; the batch needs it to pick which latency feeds the per-URL histogram.


def not_ok_requests : Int64 #

def ok_requests : Int64 #

def record(sample : Sample) : Nil #

def record_error(url_index : Int32, category : String, message : String | Nil) : Nil #

Transport errors are excluded from latency metrics: connect failures (~0 ms) and timeouts would otherwise skew the percentiles.


def response_count : Int64 #

def send_delay : Cryload::Histogram::Sparse #

def status_latency : Hash(Int32, Cryload::Histogram::Sparse) #


def total_request_count : Int64 #

def total_response_bytes : Int64 #

def transport_error_count : Int64 #


def url_stats : Hash(Int32, Cryload::Stats::UrlBatch) #