Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. HdrHistogram.NET

HdrHistogram.NET

NOASSERTIONC#v2.5.0

A .NET library for high-dynamic-range histograms to accurately record and analyze latency and performance measurements.

GitHubGitHub
185 stars32 forks0 contributors

What is HdrHistogram.NET?

HdrHistogram.NET is a .NET library for creating high-dynamic-range histograms to record and analyze latency and performance measurements with high precision. It solves the problem of accurately capturing response time distributions by avoiding reliance on mean or percentile summaries, instead storing all data in a memory-efficient structure. The library is optimized for low-overhead recording, making it suitable for performance-sensitive applications.

Target Audience

Developers and performance engineers building .NET applications who need to measure and analyze latency, response times, or other high-volume metrics with accurate percentile distributions.

Value Proposition

Developers choose HdrHistogram.NET for its ability to capture full latency distributions with minimal performance impact, constant memory usage, and support for high dynamic ranges. Its port from the widely-used Java HdrHistogram ensures reliability and alignment with industry best practices for performance measurement.

Overview

The .NET port of HdrHistogram

Use Cases

Best For

  • Measuring response times in microservices or web applications
  • Benchmarking latency-sensitive .NET code
  • Analyzing percentile distributions of performance metrics
  • Recording high-volume timing data with low overhead
  • Comparing performance results across multiple test runs
  • Visualizing latency distributions using charting tools

Not Ideal For

  • Teams needing real-time, streaming performance dashboards without manual post-processing code
  • Projects relying on out-of-the-box APM tools like Application Insights for automatic monitoring
  • Applications with ultra-tight memory constraints where fixed allocations (~185KB for common configs) are prohibitive
  • Developers seeking simple mean/median calculations without full distribution analysis overhead

Pros & Cons

Pros

Nanosecond Precision Recording

Records values in as low as 3-6 nanoseconds per sample on modern hardware, enabling high-volume latency measurement without significant overhead, as benchmarked in the README.

Dynamic Range Flexibility

Supports tracking from nanoseconds to hours with configurable significant digits (e.g., 3 digits), allowing precise analysis across vast value ranges without dynamic resizing.

Memory-Efficient Storage

Uses a constant memory footprint based on dynamic range and precision settings, avoiding allocation costs during recording or iteration, with fixed sizes detailed in the footprint estimation section.

Corrected Latency Analysis

Includes RecordValueWithExpectedInterval to account for dropped measurements in latency scenarios, ensuring accurate percentile distributions as explained in the 'Corrected vs. Raw' recording section.

Cons

Thread-Safety Complexity

Default histograms like LongHistogram are not internally synchronized, forcing developers to manage concurrency manually or use the heavier SynchronizedHistogram variant, adding overhead and complexity.

Steep Configuration Learning

Setting up proper dynamic range, precision, and unit scaling (e.g., with Stopwatch timestamps and outputValueUnitScalingRatio) requires deep understanding of histogram concepts, which can be error-prone for newcomers.

Limited Built-In Visualization

Output formats are raw (console or files), and charting requires external tools like the provided HTML plotter, lacking direct integration with modern monitoring systems like Grafana or Prometheus.

Frequently Asked Questions

Quick Stats

Stars185
Forks32
Contributors0
Open Issues31
Last commit6 months ago
CreatedSince 2015

Tags

#statistical-analysis#metrics-collection#latency-measurement#dotnet#histogram#performance-monitoring#benchmarking#high-precision

Built With

.
.NET
C
C++

Included in

Core21.2k
Auto-fetched 1 day ago

Related Projects

AutoMapperAutoMapper

A convention-based object-object mapper in .NET.

Stars10,187
Forks2,398
Last commit7 days ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,938
Forks1,067
Last commit7 days ago
FluentValidationFluentValidation

A popular .NET validation library for building strongly-typed validation rules.

Stars9,765
Forks1,276
Last commit13 days ago
AngleSharpAngleSharp

:angel: The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

Stars5,542
Forks599
Last commit8 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub