Skip to content

TASK-400: HDR Histogram Integration #73

@copyleftdev

Description

@copyleftdev

Description

Integrate HDR Histogram for latency metrics per METRICS.md

Phase

Set up development infrastructure with Tiger Style discipline

Test-First Requirements

⚠️ Write tests BEFORE implementation

  • Test histogram accuracy (known inputs)
  • Test percentile calculations
  • Test memory bounds

Acceptance Criteria

  • Vendor HDR Histogram C library
  • Zig bindings for HDR Histogram
  • Configuration: 1ns to 1 hour, 3 significant figures
  • Record latencies from event log
  • Compute percentiles: p50, p90, p95, p99, p999
  • Bounded memory usage (independent of sample count)
  • Minimum 2 assertions per function
  • >90% test coverage
  • Accuracy verified against known distributions
  • All tests pass

Dependencies

  • TASK-100

Files to Create/Modify

vendor/hdrhistogram/...
src/hdr_histogram.zig
tests/unit/hdr_test.zig

Estimated Effort

16 hours


Tiger Style Requirements:

  • Minimum 2 assertions per function
  • All loops are bounded
  • Explicit error handling (no silent failures)
  • Code formatted with zig fmt
  • Pre-commit hook passes
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    histogramHDR histogrammetricsMetrics and statisticsphase-4Metrics & Output phasetiger-styleTiger Style philosophy compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions