• Stars
    star
    899
  • Rank 48,754 (Top 1.0 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom

HyperLogLog - an algorithm for approximating the number of distinct elements

GoDoc Go Report Card CircleCI

An improved version of HyperLogLog for the count-distinct problem, approximating the number of distinct elements in a multiset using 33-50% less space than other usual HyperLogLog implementations.

This work is based on "Better with fewer bits: Improving the performance of cardinality estimation of large data streams - Qingjun Xiao, You Zhou, Shigang Chen".

Implementation

The core differences between this and other implementations are:

  • use metro hash instead of xxhash
  • sparse representation for lower cardinalities (like HyperLogLog++)
  • loglog-beta for dynamic bias correction medium and high cardinalities.
  • 4-bit register instead of 5 (HLL) and 6 (HLL++), but most implementations use 1-byte registers out of convenience

In general it borrows a lot from InfluxData's fork of Clark Duvall's HyperLogLog++ implementation, but uses 50% less space.

Results

A direct comparison with the HyperLogLog++ implementation used by InfluxDB yielded the following results:

Exact Axiom (8.2 KB) Influx (16.39 KB)
10 10 (0.0% off) 10 (0.0% off)
50 50 (0.0% off) 50 (0.0% off)
250 250 (0.0% off) 250 (0.0% off)
1250 1249 (0.08% off) 1249 (0.08% off)
6250 6250 (0.0% off) 6250 (0.0% off)
31250 31008 (0.7744% off) 31565 (1.0080% off)
156250 156013 (0.1517% off) 156652 (0.2573% off)
781250 782364 (0.1426% off) 775988 (0.6735% off)
3906250 3869332 (0.9451% off) 3889909 (0.4183% off)
10000000 9952682 (0.4732% off) 9889556 (1.1044% off)

Note

A big thank you to Prof. Shigang Chen and his team at the University of Florida who are actively conducting research around "Big Network Data".

Contributing

Kindly check our contributing guide on how to propose bugfixes and improvements, and submitting pull requests to the project

License

© Axiom, Inc., 2024

Distributed under MIT License (The MIT License).

See LICENSE for more information.

More Repositories

1

next-axiom

The official Next.js library for Axiom.
TypeScript
315
star
2

hyperminhash

HyperMinHash: Bringing intersections to HyperLogLog
Go
301
star
3

rust-cuckoofilter

Cuckoo Filter: Practically Better Than Bloom (In Rust)
Rust
268
star
4

quantiles

Optimal Quantile Approximation in Streams
Go
162
star
5

zig-hyperloglog

Zig library for HyperLogLog estimation
Zig
82
star
6

axiom-node

[DEPRECATED] Use axiomhq/axiom-js instead.
TypeScript
79
star
7

axiom-js

Official language bindings and library extensions for Axiom
TypeScript
74
star
8

axiom-go

Official Go bindings for the Axiom API
Go
42
star
9

cli

The power of Axiom on the command line.
Go
38
star
10

flipcounter

A counter data structure that knows when to start estimating to save space
Go
35
star
11

axiom-rs

Official Rust bindings for the Axiom API
Rust
28
star
12

axiom-py

The official Python bindings for the Axiom API
Python
20
star
13

axiom-cloudflare-workers

Send logs from Cloudflare Workers to Axiom
JavaScript
18
star
14

variance

Go implementation of variance's method for one-pass variance computation with D. H. D. West improved methods which features merging of several multiple sets of statistics and adding weighted values.
Go
16
star
15

puppeteer-request-intercepter

Intercept API Requests and return Mocked Data
TypeScript
16
star
16

prisma-axiom

Axiom observability for Prisma
TypeScript
16
star
17

tracing-axiom

The official Rust tracing layer for Axiom
Rust
15
star
18

awesome-axiom

A curated list of awesome Axiom Platform, libraries, open source repos, guides, blogs, Documentation and other resources.
11
star
19

axiom-demo

Take a look at Axiom on your local machine.
Shell
11
star
20

ngbuild

Dream builders 😴💭
Go
9
star
21

axiom-lambda-extension

Ingest logs and platform events from your lambda functions
Go
8
star
22

axiom-syslog-proxy

A syslog push interface to Axiom.
Go
7
star
23

axiom-honeycomb-proxy

A log forwarder/multiplexer for Axiom and Honeycomb.
Go
7
star
24

deno-client

Minimal deno library for sending events and logs to Axiom
TypeScript
6
star
25

axiom-ai

The official package to send events from AI libraries to Axiom
TypeScript
6
star
26

axiom-grafana

The official Axiom datasource plugin for Grafana.
TypeScript
5
star
27

pkg

Commonly used Go packages for Axiom projects.
Go
4
star
28

axiom-elements

TypeScript
4
star
29

axiom-loki-multiplexer

A push interface to Axiom via Loki endpoint.
Go
4
star
30

splitblockbloom

Go
4
star
31

topkapi

Topkapi: Parallel and Fast Sketches for Finding Top-K Frequent Elements
Go
3
star
32

docs

Axiom Documentation
HTML
3
star
33

setup-axiom

Set up a local Axiom stack for testing your integration.
JavaScript
2
star
34

randhn

Random new or top 500 HN story
TypeScript
2
star
35

homebrew-tap

Collection of Homebrew formulas for Axiom, Inc. open source projects.
Ruby
1
star
36

axiom-cloudwatch-lambda

Ingest CloudWatch Logs into Axiom.
Python
1
star
37

golang-sync-bench

Benchmarking Synchronization Primitives in Go
Go
1
star
38

axiom-nomad

Axiom 🤝 HashiCorp
HCL
1
star
39

axiom-helm-charts

Axiom Helm Charts
Smarty
1
star
40

logmanager

Yet another Go logging library.
Go
1
star
41

terraform-aws-axiom

Setup required infrastructure and install Axiom Enterprise on AWS using Terraform.
1
star