Skip to content

TASK-401: Metrics Reducer Implementation #74

@copyleftdev

Description

@copyleftdev

Description

Implement post-run metrics computation per METRICS.md

Phase

Set up development infrastructure with Tiger Style discipline

Test-First Requirements

⚠️ Write tests BEFORE implementation

  • Test request count metrics
  • Test latency metrics
  • Test throughput calculations
  • Test error rate computation
  • Property test: metrics consistency with event log

Acceptance Criteria

  • Read event log post-run
  • Compute request metrics (total, by method, by status)
  • Compute latency distribution (HDR histogram)
  • Compute throughput (RPS, peak, min)
  • Compute connection metrics
  • Compute error metrics (total, by type)
  • Assertion evaluation (pass/fail)
  • Single-pass algorithm (O(N))
  • Metrics computation < 3s for 10M events
  • Minimum 2 assertions per function
  • >95% test coverage
  • Property test verified
  • All tests pass

Dependencies

  • TASK-400
  • TASK-100

Files to Create/Modify

src/metrics.zig
tests/unit/metrics_test.zig
tests/integration/metrics_accuracy_test.zig

Estimated Effort

28 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

    metricsMetrics and statisticsphase-4Metrics & Output phasereducerMetrics reductiontiger-styleTiger Style philosophy compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions