whatisgithub

What is hdrhistogram_c?

trondn/hdrhistogram_c — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2023-04-26

Audience · developerComplexity · 3/5DormantSetup · moderate

In one sentence

A C library for recording huge numbers of timing measurements and instantly answering questions like 'what's the 99th percentile latency?' without losing precision.

Mindmap

mindmap
  root((repo))
    What it does
      Records measurements
      Calculates percentiles
      Finds min max values
      Prints reports
    Tech stack
      C language
      Low overhead
      Embeddable
    Use cases
      Trading platforms
      Game frame timing
      Server monitoring
    Audience
      Performance engineers
      DevOps engineers
      C developers
    Origin
      C port of Java library
      Lean feature set

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Measure and report percentile latency for web requests or database queries.

USE CASE 2

Track worst-case trade execution times on a trading platform.

USE CASE 3

Spot dropped-frame outliers in game performance testing.

USE CASE 4

Monitor server response times to detect performance degradation.

What is it built with?

C

How does it compare?

trondn/hdrhistogram_c0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2023-04-262022-10-032020-05-03
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires compiling the C library and linking it into your project.

So what is it?

HdrHistogram_c is a C library for measuring and analyzing performance metrics with extreme precision. It solves a real problem: when you're timing things in software, like how fast a web request is processed or how long a database query takes, you often need to know not just the average time, but also the slowest outliers. This library lets you record thousands or millions of individual measurements and then ask questions like "what's the 99th percentile response time?" or "what's the worst-case scenario I should plan for?" The way it works is straightforward: you create a histogram, feed it measurements as your program runs, and then ask it statistical questions about those measurements. The "High Dynamic Range" part of the name means it can handle measurements that span a huge range, from 1 nanosecond to hours, all at the same time without losing precision on the small numbers or wasting memory on the large ones. The library automatically organizes your data into buckets and can calculate percentiles, find min/max values, and print detailed reports. You'd use this if you're building performance-critical systems where knowing your worst cases matters. For example, a trading platform needs to know not just the average latency of trades, but the 99.99th percentile, because even one very slow trade can be costly. A game developer cares about frame time outliers because one dropped frame ruins the player experience. DevOps engineers use it to monitor server response times and spot performance degradation. The library is written in C, which means it's fast and can be embedded directly into applications that need minimal overhead. This particular port brings the functionality from the original Java HdrHistogram library to C programs. It supports the core features, recording values, multiple ways to iterate through the data, and saving/loading histograms from disk, but doesn't include some of the more specialized variants like atomic histograms (used in multithreaded Java) or floating-point histograms, keeping the C version lean and focused.

Copy-paste prompts

Prompt 1
Show me how to record request latencies into an HdrHistogram_c histogram and print the 99th percentile.
Prompt 2
Help me embed hdrhistogram_c into my C application to track worst-case response times.
Prompt 3
Write example code that saves and reloads an HdrHistogram_c histogram from disk.
Prompt 4
Explain how to iterate over histogram buckets using hdrhistogram_c's API.

Frequently asked questions

What is hdrhistogram_c?

A C library for recording huge numbers of timing measurements and instantly answering questions like 'what's the 99th percentile latency?' without losing precision.

Is hdrhistogram_c actively maintained?

Dormant — no commits in 2+ years (last push 2023-04-26).

How hard is hdrhistogram_c to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is hdrhistogram_c for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.