Documentation ¶
Overview ¶
Package stats contains functionality that is used to parse the log file produced by reproxy, to extract stat information.
Index ¶
- Constants
- func BandwidthStats(s *spb.Stats) (string, string)
- func CompletionStats(s *spb.Stats) string
- func FromSeriesToProto(name string, rawValues []int64) *stpb.Stat
- func WriteFromRecords(recs []*lpb.LogRecord, pInfo []*lpb.ProxyInfo, outputDir string)
- func WriteStats(sPb *spb.Stats, outputdir string) error
- type ProtoSaver
- type Stat
- type Stats
Constants ¶
const ( // AggregatedMetricsFileBaseName is the base name of the rbe metric file. // // We typically work with two rbe_metrics files: // rbe_metrics.pb // rbe_metrics.txt AggregatedMetricsFileBaseName = "rbe_metrics" )
Variables ¶
This section is empty.
Functions ¶
func BandwidthStats ¶
BandwidthStats returns the human readable form of download and uplaod bandwidth consumed by reproxy.
func CompletionStats ¶
CompletionStats returns the human readable form of the number of actions executed by reproxy grouped by their completion status.
func FromSeriesToProto ¶
FromSeriesToProto creates a Stat proto, and set its statistical properties based on input vals.
func WriteFromRecords ¶
WriteFromRecords aggregates records, adds tool version and environment variables, and dumps the result to files in both ASCII and binary formats.
Types ¶
type ProtoSaver ¶
ProtoSaver is an implentation of bigquery.ValueSaver for spb.Stats
type Stat ¶
type Stat struct { // The number of all the true values for bools, the sum of all the values for ints. Count int64 // For enum stats, the count of each value. CountByValue map[string]int64 // Commands that have the highest values. Outlier1, Outlier2 *stpb.Outlier Median, Percentile75, Percentile85, Percentile95 int64 Average float64 // contains filtered or unexported fields }
Stat is a collection of aggregated metrics for a single field.
type Stats ¶
type Stats struct { NumRecords int64 Stats map[string]*Stat ProxyInfos []*lpb.ProxyInfo // contains filtered or unexported fields }
Stats is a collection of Stat by field name.
func NewFromRecords ¶
NewFromRecords creates a new Stats from the given Records.
func (*Stats) FinalizeAggregate ¶
FinalizeAggregate aggregates and finalizes all Stats.