Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-10-06 09:15:58 +0300
committerKamil TrzciƄski <ayufan@ayufan.eu>2020-10-13 00:13:32 +0300
commitde9d20dc6195127d1e01e41cccb1441ee6445116 (patch)
tree4dfb090c91e99013f2158c64d314e4fdb90d9dee /metrics/metrics.go
parent9f0f94d4cbc211058a2df3d631d12756b79f6a9b (diff)
Split cache set/get and add metrics
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r--metrics/metrics.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index d6dc8ce1..d2243fae 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -173,6 +173,26 @@ var (
[]string{"cache"},
)
+ // ZipServingArchiveDataOffsetCache is the number of zip archive
+ // data offset cache hits/misses
+ ZipServingArchiveDataOffsetCache = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Name: "gitlab_pages_zip_data_offset_cache_requests",
+ Help: "The number of zip archive data offset cache hits/misses",
+ },
+ []string{"cache"},
+ )
+
+ // ZipServingArchiveReadlinkCache is the number of zip archive Readlink
+ // cache hits/misses
+ ZipServingArchiveReadlinkCache = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Name: "gitlab_pages_zip_readlink_cache_requests",
+ Help: "The number of zip archives Readlink cache hits/misses",
+ },
+ []string{"cache"},
+ )
+
// ZipCachedArchives is the number of zip archives currently in the cache
ZipCachedArchives = prometheus.NewGauge(
prometheus.GaugeOpts{
@@ -226,6 +246,8 @@ func MustRegister() {
ZipOpened,
ZipOpenedEntriesCount,
ZipServingArchiveCache,
+ ZipServingArchiveDataOffsetCache,
+ ZipServingArchiveReadlinkCache,
ZipArchiveEntriesCached,
ZipCachedArchives,
)