Versions in this module Expand all Collapse all v1 v1.0.0 Oct 28, 2016 Changes in this version + const HeaderLength + const HistogramMax + const HistogramMin + const Instance1Length + const Instance2Length + const InstanceDomainLength + const MaxDataValueSize + const MaxV1NameLength + const Metric1Length + const Metric2Length + const PCPClusterIDBitLength + const PCPInstanceDomainBitLength + const PCPMetricItemBitLength + const StringLength + const TocLength + const ValueLength + const Version + var EraseFileOnStop = false + func EnableLogging(enable bool) + type Client interface + MustRegister func(Metric) + MustRegisterString func(string, interface{}, MetricType, MetricSemantics, MetricUnit) Metric + MustStart func() + MustStop func() + Register func(Metric) error + RegisterString func(string, interface{}, MetricType, MetricSemantics, MetricUnit) (Metric, error) + Registry func() Registry + Start func() error + Stop func() error + type CountUnit uint32 + const OneUnit + func (c CountUnit) PMAPI() uint32 + func (i CountUnit) String() string + type Counter interface + Inc func(int64) error + MustInc func(int64) + Set func(int64) error + Up func() + Val func() int64 + type CounterVector interface + Inc func(int64, string) error + IncAll func(int64) + MustInc func(int64, string) + MustSet func(int64, string) + Set func(int64, string) error + SetAll func(int64) + Up func(string) + UpAll func() + Val func(string) (int64, error) + type Gauge interface + Dec func(float64) error + Inc func(float64) error + MustDec func(float64) + MustInc func(float64) + MustSet func(float64) + Set func(float64) error + Val func() float64 + type GaugeVector interface + Dec func(float64, string) error + DecAll func(float64) + Inc func(float64, string) error + IncAll func(float64) + MustDec func(float64, string) + MustInc func(float64, string) + MustSet func(float64, string) + Set func(float64, string) error + SetAll func(float64) + Val func(string) (float64, error) + type Histogram interface + High func() int64 + Low func() int64 + Max func() int64 + Mean func() float64 + Min func() int64 + MustRecord func(int64) + MustRecordN func(int64, int64) + Percentile func(float64) int64 + Record func(int64) error + RecordN func(int64, int64) error + StandardDeviation func() float64 + Variance func() float64 + type HistogramBucket struct + Count int64 + From int64 + To int64 + type InstanceDomain interface + Description func() string + HasInstance func(name string) bool + ID func() uint32 + InstanceCount func() int + Instances func() []string + Name func() string + type InstanceMetric interface + Instances func() []string + MustSetInstance func(interface{}, string) + SetInstance func(interface{}, string) error + ValInstance func(string) (interface{}, error) + type Instances map[string]interface + func (i Instances) Keys() []string + type MMVFlag int + const NoPrefixFlag + const ProcessFlag + const SentinelFlag + func (i MMVFlag) String() string + type Metric interface + Description func() string + ID func() uint32 + Name func() string + Semantics func() MetricSemantics + Type func() MetricType + Unit func() MetricUnit + type MetricSemantics int32 + const CounterSemantics + const DiscreteSemantics + const InstantSemantics + const NoSemantics + func (i MetricSemantics) String() string + type MetricType int32 + const DoubleType + const FloatType + const Int32Type + const Int64Type + const StringType + const Uint32Type + const Uint64Type + func (i MetricType) String() string + func (m MetricType) IsCompatible(val interface{}) bool + type MetricUnit interface + PMAPI func() uint32 + type PCPClient struct + func NewPCPClient(name string) (*PCPClient, error) + func NewPCPClientWithRegistry(name string, registry *PCPRegistry) (*PCPClient, error) + func (c *PCPClient) Length() int + func (c *PCPClient) MustRegister(m Metric) + func (c *PCPClient) MustRegisterIndom(indom InstanceDomain) + func (c *PCPClient) MustRegisterString(str string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) Metric + func (c *PCPClient) MustStart() + func (c *PCPClient) MustStop() + func (c *PCPClient) Register(m Metric) error + func (c *PCPClient) RegisterIndom(indom InstanceDomain) error + func (c *PCPClient) RegisterString(str string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) (Metric, error) + func (c *PCPClient) Registry() Registry + func (c *PCPClient) SetFlag(flag MMVFlag) error + func (c *PCPClient) Start() error + func (c *PCPClient) Stop() error + type PCPCounter struct + func NewPCPCounter(val int64, name string, desc ...string) (*PCPCounter, error) + func (c *PCPCounter) Inc(val int64) error + func (c *PCPCounter) MustInc(val int64) + func (c *PCPCounter) Set(val int64) error + func (c *PCPCounter) Up() + func (c *PCPCounter) Val() int64 + func (m PCPCounter) Indom() *PCPInstanceDomain + type PCPCounterVector struct + func NewPCPCounterVector(values map[string]int64, name string, desc ...string) (*PCPCounterVector, error) + func (c *PCPCounterVector) Inc(inc int64, instance string) error + func (c *PCPCounterVector) IncAll(val int64) + func (c *PCPCounterVector) MustInc(inc int64, instance string) + func (c *PCPCounterVector) MustSet(val int64, instance string) + func (c *PCPCounterVector) Set(val int64, instance string) error + func (c *PCPCounterVector) SetAll(val int64) + func (c *PCPCounterVector) Up(instance string) + func (c *PCPCounterVector) UpAll() + func (c *PCPCounterVector) Val(instance string) (int64, error) + func (m PCPCounterVector) Indom() *PCPInstanceDomain + func (m PCPCounterVector) Instances() []string + type PCPGauge struct + func NewPCPGauge(val float64, name string, desc ...string) (*PCPGauge, error) + func (g *PCPGauge) Dec(val float64) error + func (g *PCPGauge) Inc(val float64) error + func (g *PCPGauge) MustDec(val float64) + func (g *PCPGauge) MustInc(val float64) + func (g *PCPGauge) MustSet(val float64) + func (g *PCPGauge) Set(val float64) error + func (g *PCPGauge) Val() float64 + func (m PCPGauge) Indom() *PCPInstanceDomain + type PCPGaugeVector struct + func NewPCPGaugeVector(values map[string]float64, name string, desc ...string) (*PCPGaugeVector, error) + func (g *PCPGaugeVector) Dec(inc float64, instance string) error + func (g *PCPGaugeVector) DecAll(val float64) + func (g *PCPGaugeVector) Inc(inc float64, instance string) error + func (g *PCPGaugeVector) IncAll(val float64) + func (g *PCPGaugeVector) MustDec(inc float64, instance string) + func (g *PCPGaugeVector) MustInc(inc float64, instance string) + func (g *PCPGaugeVector) MustSet(val float64, instance string) + func (g *PCPGaugeVector) Set(val float64, instance string) error + func (g *PCPGaugeVector) SetAll(val float64) + func (g *PCPGaugeVector) Val(instance string) (float64, error) + func (m PCPGaugeVector) Indom() *PCPInstanceDomain + func (m PCPGaugeVector) Instances() []string + type PCPHistogram struct + func NewPCPHistogram(name string, low, high int64, sigfigures int, unit MetricUnit, desc ...string) (*PCPHistogram, error) + func (h *PCPHistogram) Buckets() []*HistogramBucket + func (h *PCPHistogram) High() int64 + func (h *PCPHistogram) Low() int64 + func (h *PCPHistogram) Max() int64 + func (h *PCPHistogram) Mean() float64 + func (h *PCPHistogram) Min() int64 + func (h *PCPHistogram) MustRecord(val int64) + func (h *PCPHistogram) MustRecordN(val, n int64) + func (h *PCPHistogram) Percentile(p float64) int64 + func (h *PCPHistogram) Record(val int64) error + func (h *PCPHistogram) RecordN(val, n int64) error + func (h *PCPHistogram) StandardDeviation() float64 + func (h *PCPHistogram) Variance() float64 + func (m PCPHistogram) Indom() *PCPInstanceDomain + func (m PCPHistogram) Instances() []string + type PCPInstanceDomain struct + func NewPCPInstanceDomain(name string, instances []string, desc ...string) (*PCPInstanceDomain, error) + func (indom *PCPInstanceDomain) Description() string + func (indom *PCPInstanceDomain) HasInstance(name string) bool + func (indom *PCPInstanceDomain) ID() uint32 + func (indom *PCPInstanceDomain) InstanceCount() int + func (indom *PCPInstanceDomain) Instances() []string + func (indom *PCPInstanceDomain) MatchInstances(ins []string) bool + func (indom *PCPInstanceDomain) Name() string + func (indom *PCPInstanceDomain) String() string + type PCPInstanceMetric struct + func NewPCPInstanceMetric(vals Instances, name string, indom *PCPInstanceDomain, t MetricType, ...) (*PCPInstanceMetric, error) + func (m *PCPInstanceMetric) MustSetInstance(val interface{}, instance string) + func (m *PCPInstanceMetric) SetInstance(val interface{}, instance string) error + func (m *PCPInstanceMetric) ValInstance(instance string) (interface{}, error) + func (m PCPInstanceMetric) Indom() *PCPInstanceDomain + func (m PCPInstanceMetric) Instances() []string + type PCPMetric interface + Indom func() *PCPInstanceDomain + LongDescription func() string + ShortDescription func() string + type PCPRegistry struct + func NewPCPRegistry() *PCPRegistry + func (r *PCPRegistry) AddInstanceDomain(indom InstanceDomain) error + func (r *PCPRegistry) AddInstanceDomainByName(name string, instances []string) (InstanceDomain, error) + func (r *PCPRegistry) AddMetric(m Metric) error + func (r *PCPRegistry) AddMetricByString(str string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) (Metric, error) + func (r *PCPRegistry) HasInstanceDomain(name string) bool + func (r *PCPRegistry) HasMetric(name string) bool + func (r *PCPRegistry) InstanceCount() int + func (r *PCPRegistry) InstanceDomainCount() int + func (r *PCPRegistry) MetricCount() int + func (r *PCPRegistry) StringCount() int + func (r *PCPRegistry) ValuesCount() int + type PCPSingletonMetric struct + func NewPCPSingletonMetric(val interface{}, name string, t MetricType, s MetricSemantics, u MetricUnit, ...) (*PCPSingletonMetric, error) + func (m *PCPSingletonMetric) MustSet(val interface{}) + func (m *PCPSingletonMetric) Set(val interface{}) error + func (m *PCPSingletonMetric) String() string + func (m *PCPSingletonMetric) Val() interface{} + func (m PCPSingletonMetric) Indom() *PCPInstanceDomain + type PCPTimer struct + func NewPCPTimer(name string, unit TimeUnit, desc ...string) (*PCPTimer, error) + func (m PCPTimer) Indom() *PCPInstanceDomain + func (t *PCPTimer) Start() error + func (t *PCPTimer) Stop() (float64, error) + type Registry interface + AddInstanceDomain func(InstanceDomain) error + AddInstanceDomainByName func(name string, instances []string) (InstanceDomain, error) + AddMetric func(Metric) error + AddMetricByString func(name string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) (Metric, error) + HasInstanceDomain func(name string) bool + HasMetric func(name string) bool + InstanceCount func() int + InstanceDomainCount func() int + MetricCount func() int + StringCount func() int + ValuesCount func() int + type SingletonMetric interface + MustSet func(interface{}) + Set func(interface{}) error + Val func() interface{} + type SpaceUnit uint32 + const ByteUnit + const ExabyteUnit + const GigabyteUnit + const KilobyteUnit + const MegabyteUnit + const PetabyteUnit + const TerabyteUnit + func (i SpaceUnit) String() string + func (s SpaceUnit) PMAPI() uint32 + type TimeUnit uint32 + const HourUnit + const MicrosecondUnit + const MillisecondUnit + const MinuteUnit + const NanosecondUnit + const SecondUnit + func (i TimeUnit) String() string + func (t TimeUnit) PMAPI() uint32 + type Timer interface + Start func() error + Stop func() (float64, error) v1.0.0-alpha Jul 11, 2016 Incompatible versions in this module v3.0.0+incompatible Oct 30, 2017 v2.0.0+incompatible Apr 5, 2017 Other modules containing this package github.com/performancecopilot/speed/v4