• This repository has been archived on 01/Jun/2023
  • Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Streaming approximate histograms in Go

gohistogram - Histograms in Go

build status

This package provides Streaming Approximate Histograms for efficient quantile approximations.

The histograms in this package are based on the algorithms found in Ben-Haim & Yom-Tov's A Streaming Parallel Decision Tree Algorithm (PDF). Histogram bins do not have a preset size. As values stream into the histogram, bins are dynamically added and merged.

Another implementation can be found in the Apache Hive project (see NumericHistogram).

An example:

histogram

The accurate method of calculating quantiles (like percentiles) requires data to be sorted. Streaming histograms make it possible to approximate quantiles without sorting (or even individually storing) values.

NumericHistogram is the more basic implementation of a streaming histogram. WeightedHistogram implements bin values as exponentially-weighted moving averages.

A maximum bin size is passed as an argument to the constructor methods. A larger bin size yields more accurate approximations at the cost of increased memory utilization and performance.

A picture of kittens:

stack of kittens

Getting started

Using in your own code

$ go get github.com/VividCortex/gohistogram
import "github.com/VividCortex/gohistogram"

Running tests and making modifications

Get the code into your workspace:

$ cd $GOPATH
$ git clone [email protected]:VividCortex/gohistogram.git ./src/github.com/VividCortex/gohistogram

You can run the tests now:

$ cd src/github.com/VividCortex/gohistogram
$ go test .

API Documentation

Full source documentation can be found here.

Contributing

We only accept pull requests for minor fixes or improvements. This includes:

  • Small bug fixes
  • Typos
  • Documentation or comments

Please open issues to discuss new features. Pull requests for new features will be rejected, so we recommend forking the repository and making changes in your fork for your use case.

License

Copyright (c) 2013 VividCortex

Released under MIT License. Check LICENSE file for details.

More Repositories

1

go-database-sql-tutorial

A tutorial for Go's database/sql package
CSS
807
star
2

angular-recaptcha

AngularJS directive to add a reCaptcha widget to your form
JavaScript
496
star
3

godaemon

Daemonize Go applications deviously.
Go
494
star
4

ewma

Exponentially Weighted Moving Average algorithms for Go.
Go
435
star
5

siesta

Composable framework for writing HTTP handlers in Go.
Go
349
star
6

johnny-deps

Barebones dependency manager for Go.
Perl
214
star
7

mysqlerr

MySQL Server Error Constants for Golang
Go
195
star
8

ebooks

LaTeX source files for VividCortex's ebooks
TeX
181
star
9

robustly

Run functions resiliently in Go, catching and restarting panics
Go
157
star
10

pm

Processlist manager with TCP listener
Go
80
star
11

multitick

A multiplexor for aligned time.Time tickers in Go
Go
70
star
12

trace

Easily trace goroutines at runtime
Go
50
star
13

dbcontrol

A wrapper around Go's database/sql package that provides connection pool limits
Go
29
star
14

lastseen

Last-seen sketch implementation in Go
Go
16
star
15

wlr

Weighted linear regression
Go
15
star
16

approx-queueing-theory

Approximations to the Erlang C queue length formula for M/M/n queues
Go
11
star
17

golibpcap

This is a fork of the https://code.google.com/p/golibpcap/ project.
Go
11
star
18

pm-web

A simple web front-end for pm, a process manager for Go
JavaScript
10
star
19

grunt-circleci

[DEPRECATED] A Grunt plugin for checking build statuses in CircleCI
JavaScript
5
star
20

grafana-datasource

Datasource plugin for connecting your Grafana dashboard to SolarWind's DPM
TypeScript
4
star
21

puppet

Puppet example for the installation of the VividCortex repository
Puppet
2
star
22

hubot-vividcortex

VividCortex hubot script!
CoffeeScript
2
star
23

snappy-go

Clone of the snappy package for Go from code.google.coml (DEPRECATED: we're moving to VividCortex/snappy)
Go
2
star
24

docker

Docker container for VividCortex agents
Dockerfile
1
star