All Projects → caio → Go Tdigest

caio / Go Tdigest

Licence: mit
A T-Digest implementation in golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Tdigest

Processhacker
A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
Stars: ✭ 6,285 (+9280.6%)
Mutual labels:  monitoring, performance
Swell
Swell: API development tool that enables developers to test endpoints served over streaming technologies including Server-Sent Events (SSE), WebSockets, HTTP2, GraphQL, and gRPC.
Stars: ✭ 517 (+671.64%)
Mutual labels:  streaming, monitoring
Watchdoginspector
Shows your current framerate (fps) in the status bar of your iOS app
Stars: ✭ 497 (+641.79%)
Mutual labels:  monitoring, performance
App perf
Open source application performance monitoring tool with emphasis on ease of setup and use. Providing similar functionality like NewRelic/AppNeta/Skylight etc.
Stars: ✭ 353 (+426.87%)
Mutual labels:  monitoring, performance
Raftlib
The RaftLib C++ library, streaming/dataflow concurrency via C++ iostream-like operators
Stars: ✭ 717 (+970.15%)
Mutual labels:  parallel, streaming
Guider
Performance Analyzer
Stars: ✭ 393 (+486.57%)
Mutual labels:  monitoring, performance
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+665.67%)
Mutual labels:  monitoring, performance
Grav
Performance visualisation tools
Stars: ✭ 262 (+291.04%)
Mutual labels:  monitoring, performance
Pcp
Performance Co-Pilot
Stars: ✭ 716 (+968.66%)
Mutual labels:  monitoring, performance
Swagger Stats
API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
Stars: ✭ 559 (+734.33%)
Mutual labels:  monitoring, performance
Doraemonkit
一款面向泛前端产品研发全生命周期的效率平台。
Stars: ✭ 18,305 (+27220.9%)
Mutual labels:  monitoring, performance
Node Servertiming
📊 Generate Server-Timing headers interactively in NodeJS
Stars: ✭ 19 (-71.64%)
Mutual labels:  monitoring, performance
Chartjs Plugin Streaming
Chart.js plugin for live streaming data
Stars: ✭ 310 (+362.69%)
Mutual labels:  streaming, monitoring
Trace Nodejs
Trace is a visualised distributed tracing platform designed for microservices.
Stars: ✭ 471 (+602.99%)
Mutual labels:  monitoring, performance
Pyroscope
Continuous Profiling Platform! Debug performance issues down to a single line of code
Stars: ✭ 4,816 (+7088.06%)
Mutual labels:  monitoring, performance
Ruby server timing
Bring Rails server-side performance metrics 📈 to Chrome's Developer Tools via the Server Timing API. Production Safe™.
Stars: ✭ 508 (+658.21%)
Mutual labels:  monitoring, performance
Marathon
Cross-platform test runner written for Android and iOS projects
Stars: ✭ 250 (+273.13%)
Mutual labels:  parallel, performance
Metered Rs
Fast, ergonomic metrics for Rust
Stars: ✭ 258 (+285.07%)
Mutual labels:  monitoring, performance
Automon
Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor your Java code, the JDK, and 3rd party libraries.
Stars: ✭ 548 (+717.91%)
Mutual labels:  monitoring, performance
Uplot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+10061.19%)
Mutual labels:  streaming, performance

T-Digest

A fast map-reduce and parallel streaming friendly data-structure for accurate quantile approximation.

This package provides an implementation of Ted Dunning's t-digest data structure in Go.

GoDoc Go Report Card

Project Status

This project is actively maintained. We are happy to collaborate on features and issues if/when they arrive.

Installation

Our releases are tagged and signed following the Semantic Versioning scheme. If you are using a dependency manager such as dep, the recommended way to is go about your business normally:

go get github.com/caio/go-tdigest

Otherwise we recommend to use the following so that you don't risk breaking your build because of an API change:

go get gopkg.in/caio/go-tdigest.v2

Example Usage

package main

import (
	"fmt"
	"math/rand"

	"github.com/caio/go-tdigest"
)

func main() {
	// Analogue to tdigest.New(tdigest.Compression(100))
	t, _ := tdigest.New()

	for i := 0; i < 10000; i++ {
		// Analogue to t.AddWeighted(rand.Float64(), 1)
		t.Add(rand.Float64())
	}

	fmt.Printf("p(.5) = %.6f\n", t.Quantile(0.5))
	fmt.Printf("CDF(Quantile(.5)) = %.6f\n", t.CDF(t.Quantile(0.5)))
}

Configuration

You can configure your digest upon creation with options documented at options.go. Example:

// Construct a digest with compression=200 and its own
// (thread-unsafe) RNG seeded with 0xCA10:
digest, _ := tdigest.New(
        tdigest.Compression(200),
        tdigest.LocalRandomNumberGenerator(0xCA10),
)

Porting Existing Code to the v2 API

It's very easy to migrate to the new API:

  • Replace tdigest.New(100) with tdigest.New()
  • Replace tdigest.New(number) with tdigest.New(tdigest.Compression(number))
  • Replace Add(x,1) with Add(x)
  • Replace Add(x, weight) with AddWeighted(x, weight)
  • Remove any use of tdigest.Len() (or open an issue)

References

This is a port of the reference implementation with some ideas borrowed from the python version. If you wanna get a quick grasp of how it works and why it's useful, this video and companion article is pretty helpful.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].