Cryload::Stats::Batch - cryload 6.0.0

# class Cryload::Stats::Batch

- Cryload::Stats::Batch
- Reference
- Object

##
Overview

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

##
Defined in:

cryload/stats.cr

##
Constructors

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

##
Instance Method Summary

- #connect : Cryload::Histogram::Sparse
- #corrected_latency : Cryload::Histogram::Sparse
- #dns : Cryload::Histogram::Sparse
- #empty? : Bool
- #error_counts : Hash(String, Int64)
- #error_messages : Hash(String, String)
- #latency : Cryload::Histogram::Sparse
- #latency_correction=(latency_correction : Bool)

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

- #latency_correction? : Bool

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

- #not_ok_requests : Int64
- #ok_requests : Int64
- #record(sample : Sample) : Nil
- #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.

- #response_count : Int64
- #send_delay : Cryload::Histogram::Sparse
- #status_latency : Hash(Int32, Cryload::Histogram::Sparse)
- #tls : Cryload::Histogram::Sparse
- #total_request_count : Int64
- #total_response_bytes : Int64
- #transport_error_count : Int64
- #ttfb : Cryload::Histogram::Sparse
- #url_stats : Hash(Int32, Cryload::Stats::UrlBatch)

##
Constructor Detail

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

##
Instance Method Detail

def connect : Cryload::Histogram::Sparse #
def corrected_latency : Cryload::Histogram::Sparse #
def dns : Cryload::Histogram::Sparse #
def empty? : Bool #
def error_counts : Hash(String, Int64) #
def error_messages : Hash(String, String) #
def latency : Cryload::Histogram::Sparse #
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 tls : Cryload::Histogram::Sparse #
def total_request_count : Int64 #
def total_response_bytes : Int64 #
def transport_error_count : Int64 #
def ttfb : Cryload::Histogram::Sparse #
def url_stats : Hash(Int32, Cryload::Stats::UrlBatch) #