diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-06-09 18:43:51 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-06-14 08:52:34 +0300 |
commit | 68195ae01164e62e3d92156ec84e09c7416e3f94 (patch) | |
tree | 47243c8520b7d9af7f9dee755bf66a3fda5026cd /internal/blackbox | |
parent | d785451259398be9fbf1b053f76f98ba13f7b478 (diff) |
stats: Move wants refs from GET to POST
When doing a POST to git-upload-pack(1), then we send along a set of
"want"s which tell the remote side which references we want to receive.
So while this depends on us knowing which references exist in the first
place, it still is inarguably a property of the POST and not of the GET
which discovers available refs.
Let's make the relation more explicit by 1. moving wants into the `Post`
structure and 2. accepting announced references as parameter when doing
the post.
Diffstat (limited to 'internal/blackbox')
-rw-r--r-- | internal/blackbox/blackbox.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/blackbox/blackbox.go b/internal/blackbox/blackbox.go index 1563bec6d..1147b2c15 100644 --- a/internal/blackbox/blackbox.go +++ b/internal/blackbox/blackbox.go @@ -125,7 +125,7 @@ func (b Blackbox) doProbe(probe Probe) { setGauge(b.getFirstPacket, clone.Get.FirstGitPacket().Seconds()) setGauge(b.getTotalTime, clone.Get.ResponseBody().Seconds()) setGauge(b.getAdvertisedRefs, float64(len(clone.Get.Refs()))) - setGauge(b.wantedRefs, float64(clone.RefsWanted())) + setGauge(b.wantedRefs, float64(clone.Post.RefsWanted())) setGauge(b.postTotalTime, clone.Post.ResponseBody().Seconds()) setGauge(b.postFirstProgressPacket, clone.Post.BandFirstPacket("progress").Seconds()) setGauge(b.postFirstPackPacket, clone.Post.BandFirstPacket("pack").Seconds()) |