class
Cryload::Stats
- Cryload::Stats
- Reference
- Object
Overview
Stats holder for the benchmark
Defined in:
cryload/stats.crConstant Summary
-
HISTOGRAM_BUCKET_COUNT =
((Math.log(HISTOGRAM_MAX_MS / HISTOGRAM_MIN_MS)) / HISTOGRAM_LOG_GROWTH).ceil.to_i + 1 -
HISTOGRAM_GROWTH =
1.01 -
HISTOGRAM_LOG_GROWTH =
Math.log(HISTOGRAM_GROWTH) -
HISTOGRAM_MAX_MS =
3600000.0 -
HISTOGRAM_MIN_MS =
0.001 -
HDR-style logarithmic histogram: ~1% relative precision from 1µs to 1h in a few thousand buckets, instead of a dense linear bucket array.
-
TIME_IN_MILISECONDS =
1000
Constructors
Class Method Summary
- .histogram_bucket_index(value_ms : Float64) : Int32
-
.histogram_bucket_value(index : Int32) : Float64
Geometric midpoint of the bucket, the best estimate for values in it.
Instance Method Summary
- #<<(request : Request)
- #average_bytes_per_response
- #average_request_time
- #benchmark_start : Time::Instant
- #bytes_per_second
- #ci_thresholds : Cryload::CiThresholds
- #csv_output
- #duration_mode : Bool
- #empty?
- #error_counts
- #failure_rate_percent
- #final_exit_code
- #json_output
- #latency_histogram_bins(bin_count : Int32 = 11)
- #latency_stdev
- #mark_benchmark_end
- #max_request_time
- #merge_batch(batch : Batch)
- #min_request_time
- #not_ok_requests
- #ok_requests
- #output_format : String
- #p10_request_time
- #p25_request_time
- #p50_request_time
- #p75_request_time
- #p90_request_time
- #p95_request_time
- #p999_request_time
- #p99_request_time
- #progress_enabled : Bool
- #quiet_output
- #record_error(category : String)
- #record_response(time_taken_ms : Float64, status_code : Int32, response_bytes : Int64 = 0_i64)
- #request_number : Int32
-
#request_per_second
Requests per second = total requests / wall clock time (actual throughput)
- #response_count
- #status_code_counts
- #success_status_ranges : Array(Range(Int32, Int32))
- #text_output?
- #total_request_count
- #total_request_time_in_seconds
- #total_response_bytes
- #transport_error_count
- #url : String
-
#wall_clock_seconds
Wall clock time from benchmark start to report completion.
Constructor Detail
def self.new(request_number : Int32, duration_mode : Bool = false, benchmark_start : Time::Instant = Time.instant, url : String = "", output_format : String = "text", success_status_ranges : Array(Range(Int32, Int32)) = [200..299], ci_thresholds : CiThresholds = CiThresholds.new, progress_enabled : Bool = false)
#
Class Method Detail
def self.histogram_bucket_value(index : Int32) : Float64
#
Geometric midpoint of the bucket, the best estimate for values in it.