Documentation
¶
Index ¶
- func BPSorOPS(bps, ops float64) string
- func RequestAnalysisHostsMultiSized(o bench.Operations) map[string]RequestSizeRange
- func RequestAnalysisHostsSingleSized(o bench.Operations) map[string]SingleSizedRequests
- type Aggregated
- type MultiSizedRequests
- type Operation
- type Options
- type RequestSizeRange
- type SegmentDurFn
- type SegmentSmall
- type SingleSizedRequests
- type TTFB
- type Throughput
- type ThroughputSegmented
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BPSorOPS ¶
BPSorOPS returns bytes per second if non zero otherwise operations per second as human readable string.
func RequestAnalysisHostsMultiSized ¶
func RequestAnalysisHostsMultiSized(o bench.Operations) map[string]RequestSizeRange
RequestAnalysisHostsMultiSized performs host analysis where objects have different sizes.
func RequestAnalysisHostsSingleSized ¶
func RequestAnalysisHostsSingleSized(o bench.Operations) map[string]SingleSizedRequests
RequestAnalysisHostsSingleSized performs host analysis where all objects have equal size.
Types ¶
type Aggregated ¶
type Aggregated struct {
Type string `json:"type"`
Mixed bool `json:"mixed"`
Operations []Operation `json:"operations,omitempty"`
// MixedServerStats and MixedThroughputByHost is populated only when data is mixed.
MixedServerStats *Throughput `json:"mixed_server_stats,omitempty"`
MixedThroughputByHost map[string]Throughput `json:"mixed_throughput_by_host,omitempty"`
}
Aggregated contains aggregated data for a single benchmark run.
func Aggregate ¶
func Aggregate(o bench.Operations, opts Options) Aggregated
Aggregate returns statistics when only a single operation was running concurrently.
type MultiSizedRequests ¶
type MultiSizedRequests struct {
// Skipped if too little data.
Skipped bool `json:"skipped"`
// Total number of requests.
Requests int `json:"requests"`
// Average object size
AvgObjSize int64 `json:"avg_obj_size"`
// BySize contains request times separated by sizes
BySize []RequestSizeRange `json:"by_size"`
// HostNames are the host names, sorted.
HostNames []string
// ByHost contains request information by host.
ByHost map[string]RequestSizeRange `json:"by_host,omitempty"`
}
MultiSizedRequests contains statistics when objects have the same different size.
func RequestAnalysisMultiSized ¶
func RequestAnalysisMultiSized(o bench.Operations, allThreads bool) *MultiSizedRequests
RequestAnalysisMultiSized performs analysis where objects have different sizes.
type Operation ¶
type Operation struct {
// Operation type
Type string `json:"type"`
// N is the number of operations.
N int `json:"n"`
// Skipped if too little data
Skipped bool `json:"skipped"`
// Unfiltered start time of this operation segment.
StartTime time.Time `json:"start_time"`
// Unfiltered end time of this operation segment.
EndTime time.Time `json:"end_time"`
// Objects per operation.
ObjectsPerOperation int `json:"objects_per_operation"`
// Concurrency - total number of threads running.
Concurrency int `json:"concurrency"`
// Number of warp clients.
Clients int `json:"clients"`
// Numbers of hosts
Hosts int `json:"hosts"`
// HostNames are sorted names of hosts
HostNames []string `json:"host_names"`
// Populated if requests are all of same object size.
SingleSizedRequests *SingleSizedRequests `json:"single_sized_requests,omitempty"`
// Populated if requests are of difference object sizes.
MultiSizedRequests *MultiSizedRequests `json:"multi_sized_requests,omitempty"`
// Total errors recorded.
Errors int `json:"errors"`
// Subset of errors.
FirstErrors []string `json:"first_errors"`
// Throughput information.
Throughput Throughput `json:"throughput"`
// Throughput by host.
ThroughputByHost map[string]Throughput `json:"throughput_by_host"`
}
Operation returns statistics for a single operation type.
type RequestSizeRange ¶
type RequestSizeRange struct {
// Number of requests in this range.
Requests int `json:"requests"`
// Minimum size in request size range.
MinSize int `json:"min_size"`
MinSizeString string `json:"min_size_string"`
// Maximum size in request size range (not included).
MaxSize int `json:"max_size"`
MaxSizeString string `json:"max_size_string"`
// Average payload size of requests in bytes.
AvgObjSize int `json:"avg_obj_size"`
AvgDurationMillis int `json:"avg_duration_millis"`
// Stats:
BpsAverage float64 `json:"bps_average"`
BpsMedian float64 `json:"bps_median"`
Bps90 float64 `json:"bps_90"`
Bps99 float64 `json:"bps_99"`
BpsFastest float64 `json:"bps_fastest"`
BpsSlowest float64 `json:"bps_slowest"`
// BpsPct is BPS percentiles.
BpsPct [101]float64 `json:"bps_percentiles"`
// FirstAccess is filled if the same object is accessed multiple times.
// This records the first touch of the object.
FirstAccess *RequestSizeRange `json:"first_access,omitempty"`
// Time to first byte if applicable.
FirstByte *TTFB `json:"first_byte,omitempty"`
}
type SegmentDurFn ¶
SegmentDurFn accepts a total time and should return the duration used for each segment.
type SegmentSmall ¶
type SegmentSmall struct {
// Bytes per second during the time segment.
BPS float64 `json:"bytes_per_sec"`
// Operations per second during the time segment.
OPS float64 `json:"obj_per_sec"`
// Errors logged during the time segment.
Errors int `json:"errors,omitempty"`
// Start time of the segment.
Start time.Time `json:"start"`
}
SegmentSmall represents a time segment of the run. Length of the segment is defined elsewhere.
func (SegmentSmall) StringLong ¶
func (s SegmentSmall) StringLong(d time.Duration, details bool) string
StringLong returns a long string representation of the segment.
type SingleSizedRequests ¶
type SingleSizedRequests struct {
// Skipped if too little data.
Skipped bool `json:"skipped"`
// Object size per operation. Can be 0.
ObjSize int64 `json:"obj_size"`
// Total number of requests.
Requests int `json:"requests"`
// Average request duration.
DurAvgMillis int `json:"dur_avg_millis"`
// Median request duration.
DurMedianMillis int `json:"dur_median_millis"`
// 90% request time.
Dur90Millis int `json:"dur_90_millis"`
// 99% request time.
Dur99Millis int `json:"dur_99_millis"`
// Fastest request time.
FastestMillis int `json:"fastest_millis"`
// Slowest request time.
SlowestMillis int `json:"slowest_millis"`
// DurPct is duration percentiles.
DurPct [101]int `json:"dur_percentiles_millis"`
// Time to first byte if applicable.
FirstByte *TTFB `json:"first_byte,omitempty"`
// FirstAccess is filled if the same object is accessed multiple times.
// This records the first touch of the object.
FirstAccess *SingleSizedRequests `json:"first_access,omitempty"`
LastAccess *SingleSizedRequests `json:"last_access,omitempty"`
// Host names, sorted.
HostNames []string
// Request times by host.
ByHost map[string]SingleSizedRequests `json:"by_host,omitempty"`
}
SingleSizedRequests contains statistics when all objects have the same size.
func RequestAnalysisSingleSized ¶
func RequestAnalysisSingleSized(o bench.Operations, allThreads bool) *SingleSizedRequests
RequestAnalysisSingleSized performs analysis where all objects have equal size.
type TTFB ¶
type TTFB struct {
AverageMillis int `json:"average_millis"`
FastestMillis int `json:"fastest_millis"`
P25Millis int `json:"p25_millis"`
MedianMillis int `json:"median_millis"`
P75Millis int `json:"p75_millis"`
P90Millis int `json:"p90_millis"`
P99Millis int `json:"p99_millis"`
SlowestMillis int `json:"slowest_millis"`
PercentilesMillis [101]int `json:"percentiles_millis"`
}
TTFB contains times to first byte if applicable.
type Throughput ¶
type Throughput struct {
// Errors recorded.
Errors int `json:"errors"`
// Time period of the throughput measurement.
MeasureDurationMillis int `json:"measure_duration_millis"`
// Start time of the measurement.
StartTime time.Time `json:"start_time"`
// End time of the measurement.
EndTime time.Time `json:"end_time"`
// Average bytes per second. Can be 0.
AverageBPS float64 `json:"average_bps"`
// Average operations per second.
AverageOPS float64 `json:"average_ops"`
// Number of full operations
Operations int `json:"operations"`
// Time segmented throughput summary.
Segmented *ThroughputSegmented `json:"segmented,omitempty"`
}
Throughput contains throughput.
func (Throughput) String ¶
func (t Throughput) String() string
String returns a string representation of the segment
func (Throughput) StringDetails ¶
func (t Throughput) StringDetails(details bool) string
StringDetails returns a detailed string representation of the segment
func (Throughput) StringDuration ¶
func (t Throughput) StringDuration() string
StringDuration returns a string representation of the segment duration
type ThroughputSegmented ¶
type ThroughputSegmented struct {
// Time of each segment.
SegmentDurationMillis int `json:"segment_duration_millis"`
// Will contain how segments are sorted.
// Will be 'bps' (bytes per second) or 'ops' (objects per second).
SortedBy string `json:"sorted_by"`
// All segments, sorted
Segments []SegmentSmall `json:"segments"`
// Start time of fastest time segment.
FastestStart time.Time `json:"fastest_start"`
// Fastest segment bytes per second. Can be 0. In that case segments are sorted by operations per second.
FastestBPS float64 `json:"fastest_bps"`
// Fastest segment in terms of operations per second.
FastestOPS float64 `json:"fastest_ops"`
// 50% Median....
MedianStart time.Time `json:"median_start"`
MedianBPS float64 `json:"median_bps"`
MedianOPS float64 `json:"median_ops"`
// Slowest ...
SlowestStart time.Time `json:"slowest_start"`
SlowestBPS float64 `json:"slowest_bps"`
SlowestOPS float64 `json:"slowest_ops"`
}
ThroughputSegmented contains time segmented throughput statics.