summary

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package summary provides a summary of a quantile sketch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEqual

func CheckEqual(a, e Summary) error

CheckEqual returns an error if the summaries are not equal

Types

type Summary

type Summary struct {
	// TODO: store min/max in the entries array of the summary.
	Min, Max, Sum, Avg float64

	// TODO: cnt is a duplicate of sketch.n.
	Cnt int64
}

A Summary stores basic incremental stats.

func (*Summary) Insert

func (s *Summary) Insert(v float64)

Insert adds a single value to the summary.

func (*Summary) InsertN

func (s *Summary) InsertN(v float64, n float64)

InsertN is equivalent to calling Insert(v) n times (but faster).

func (*Summary) Merge

func (s *Summary) Merge(o Summary)

Merge another summary into this one.

func (*Summary) Reset

func (s *Summary) Reset()

Reset the summary

func (*Summary) String

func (s *Summary) String() string

Jump to

Keyboard shortcuts

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