stats

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchSummary

type BatchSummary struct {
	BatchSize              int
	UncompressedSizeByte   *Summary
	CompressedSizeByte     *Summary
	OtlpArrowConversionSec *Summary
	ProcessingSec          *Summary
	SerializationSec       *Summary
	DeserializationSec     *Summary
	CompressionSec         *Summary
	DecompressionSec       *Summary
	TotalTimeSec           *Summary
	ProcessingResults      []string
	CpuMemUsage            *CpuMemUsage
	OtlpConversionSec      *Summary
}

type CpuMemUsage

type CpuMemUsage struct {
	Heap      uint64  // heap memory usage in bytes
	Malloc    uint64  // number of malloc
	Bandwidth float64 // memory bandwidth in B/s
	GcCount   uint32  // number of garbage collections
}

CpuMemUsage contains the CPU and memory usage of a specific step.

func (*CpuMemUsage) ToString

func (u *CpuMemUsage) ToString() string

type LogsStats

type LogsStats struct {
	// contains filtered or unexported fields
}

func NewLogsStats

func NewLogsStats() *LogsStats

func (*LogsStats) Analyze

func (ls *LogsStats) Analyze(logs plog.Logs)

func (*LogsStats) ShowStats

func (ls *LogsStats) ShowStats()

type Metric

type Metric struct {
	// contains filtered or unexported fields
}

func NewMetric

func NewMetric() *Metric

func (*Metric) ComputeSummary

func (m *Metric) ComputeSummary() *Summary

func (*Metric) Percentile

func (m *Metric) Percentile(pct float64) float64

func (*Metric) Record

func (m *Metric) Record(value float64)

func (*Metric) Stddev

func (m *Metric) Stddev(mean float64) float64

func (*Metric) Var

func (m *Metric) Var(mean float64) float64

type MetricsStats

type MetricsStats struct {
	// contains filtered or unexported fields
}

func NewMetricsStats

func NewMetricsStats() *MetricsStats

func (*MetricsStats) Analyze

func (ms *MetricsStats) Analyze(metrics pmetric.Metrics)

func (*MetricsStats) ShowStats

func (ms *MetricsStats) ShowStats()

type ProfilerResult

type ProfilerResult struct {
	BenchName string
	Tags      string
	Summaries []BatchSummary
}

type Summary

type Summary struct {
	Min    float64
	Max    float64
	Mean   float64
	Stddev float64
	P50    float64
	P90    float64
	P95    float64
	P99    float64
	Values []float64
}

func AddSummaries

func AddSummaries(summaries ...*Summary) *Summary

AddSummaries combines multiple Summaries by adding their metric values together. This method panics if the Summaries have different number of values.

func (*Summary) ToString

func (s *Summary) ToString() string

func (*Summary) Total

func (s *Summary) Total(maxIter uint64) float64

type SystemProbe

type SystemProbe struct {
	LastTime       time.Time // last time the probe was reset
	LastMalloc     uint64    // last observed number of malloc
	LastTotalAlloc uint64    // last observed number of total bytes allocated
	LastNumGC      uint32    // last observed number of garbage collections
}

SystemProbe is a probe that measures CPU and memory usage.

func NewSystemProbe

func NewSystemProbe() *SystemProbe

func (*SystemProbe) MeasureUsage

func (sp *SystemProbe) MeasureUsage() *CpuMemUsage

func (*SystemProbe) Reset

func (sp *SystemProbe) Reset()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL