stats

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package stats provides helpers for simple stats

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountSum

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

CountSum holds sum and count values

func (*CountSum) Add

func (s *CountSum) Add(size int64) (count uint32, sum int64)

Add adds size to s and returns approximate values for the current count and total bytes

func (*CountSum) Approximate

func (s *CountSum) Approximate() (count uint32, sum int64)

Approximate returns an approximation of the current count and sum values. It is approximate because retrieving both values is not an atomic operation.

Jump to

Keyboard shortcuts

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