summary

package
v0.0.0-...-41c389d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Summary

type Summary interface {
	Add(int64)
	Reset()
	Value() (val int64, cnt int64)
}

Summary is a summary interface.

func New

func New(window time.Duration, winBucket int) Summary

New new a summary.

use RollingCounter creates a new window. windowTime is the time covering the entire window. windowBuckets is the number of buckets the window is divided into. An example: a 10 second window with 10 buckets will have 10 buckets covering 1 second each.

Jump to

Keyboard shortcuts

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