diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-03-23 09:58:46 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-03-23 09:59:36 +0300 |
commit | e60f3926a00f22839e18e0a97a85754d8adc8aec (patch) | |
tree | c37306f7a9426961d2cfa728336dc0da53023845 /internal/blackbox | |
parent | 7806c26e68b27e14b53e6699709dd1f02d6da48a (diff) |
git: stats: Remove accessors for ReferenceDiscovery stats
The ReferenceDiscovery struct has a set of accessors to access the
values of its internal fields. All accessors return the value verbosely,
though, without any processing at all and are thus trivial.
Given that the package is internal anyway, there is no real need for
defensive coding here, so this commit removes the accessors and makes
the variables public instead.
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 b3efcfa68..db3242c88 100644 --- a/internal/blackbox/blackbox.go +++ b/internal/blackbox/blackbox.go @@ -64,7 +64,7 @@ func doProbe(probe Probe) { setGauge(getFirstPacket, clone.Get.FirstGitPacket().Seconds()) setGauge(getTotalTime, clone.Get.ResponseBody().Seconds()) - setGauge(getAdvertisedRefs, float64(len(clone.Get.Refs()))) + setGauge(getAdvertisedRefs, float64(len(clone.Get.Refs))) setGauge(wantedRefs, float64(clone.RefsWanted())) setGauge(postTotalTime, clone.Post.ResponseBody().Seconds()) setGauge(postFirstProgressPacket, clone.Post.BandFirstPacket("progress").Seconds()) |