Skip to content

feat: add per-repo fetch/serve latency histograms - #23

Merged
rolandjitsu merged 1 commit into
mainfrom
feat/latency-histograms
Aug 20, 2026
Merged

feat: add per-repo fetch/serve latency histograms#23
rolandjitsu merged 1 commit into
mainfrom
feat/latency-histograms

Conversation

@rolandjitsu

Copy link
Copy Markdown
Owner

What kind of change does this PR introduce?

  • fix
  • feat
  • refactor
  • perf
  • docs
  • test
  • build / ci
  • chore

Summary

Add duration histograms:

  1. upstream_duration_seconds{op,repo} for clone/fetch.
  2. serve_duration_seconds{kind,repo} for the info/refs advertisement and the upload-pack packfile stream

Tests

  • Added / updated tests (unit, plus integration where it fits)
  • Not relevant, because: ...

Checklist

  • CI is green locally: cargo fmt --all --check, cargo clippy --all-targets --all-features --locked -- -D warnings, cargo test --all-features
  • Commits follow Conventional Commits; AI-assisted commits carry an Assisted-by: trailer (see CONTRIBUTING.md / AGENTS.md)
  • Preserves the read-only, pull-only invariant (no push or proactive replication to upstream)
  • Docs / README updated if behavior or flags changed

Breaking change?

N/A.

Add two duration histograms alongside the existing counters:
upstream_duration_seconds{op,repo} for clone/fetch, and
serve_duration_seconds{kind,repo} for the info/refs advertisement and
the upload-pack packfile stream (timed to EOF via a reader wrapper).
Observed only on success, matching the counters' bounded-repo labels.

Assisted-by: Claude:claude-opus-4-8
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.92%. Comparing base (3339300) to head (8d16c3d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   95.51%   95.92%   +0.40%     
==========================================
  Files           5        5              
  Lines         870      957      +87     
==========================================
+ Hits          831      918      +87     
  Misses         39       39              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rolandjitsu
rolandjitsu merged commit a4e1367 into main Aug 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant