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-01 08:03:59 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-10-01 08:03:59 +0300
commit0f280ef9e75ceeab24722d296c78b3e6a004f981 (patch)
tree50d6359f54960b6e96d0ea43b07d720b9d630529 /internal/vfs/zip/archive.go
parentaec30ca4632f31e4921ecdc16c9f583bf57e6cbc (diff)
Rename all zip and httprange metrics
Renames all metrics to make them easier to understand. Adds a missing metric for number of open requests made by httprange.
Diffstat (limited to 'internal/vfs/zip/archive.go')
-rw-r--r--internal/vfs/zip/archive.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/vfs/zip/archive.go b/internal/vfs/zip/archive.go
index 85c84a9f..1fec3903 100644
--- a/internal/vfs/zip/archive.go
+++ b/internal/vfs/zip/archive.go
@@ -63,9 +63,9 @@ func (a *zipArchive) openArchive(parentCtx context.Context) (err error) {
defer func() {
// checking named return err value
if err != nil {
- metrics.ZipServingOpenArchivesTotal.WithLabelValues("error").Inc()
+ metrics.ZipOpened.WithLabelValues("error").Inc()
} else {
- metrics.ZipServingOpenArchivesTotal.WithLabelValues("ok").Inc()
+ metrics.ZipOpened.WithLabelValues("ok").Inc()
}
}()
@@ -139,8 +139,8 @@ func (a *zipArchive) readArchive() {
a.archive.File = nil
fileCount := float64(len(a.files))
- metrics.ZipServingFilesPerArchiveTotalCount.Add(fileCount)
- metrics.ZipServingFilesPerZipArchiveCurrentlyCached.Add(fileCount)
+ metrics.ZipOpenedEntriesCount.Add(fileCount)
+ metrics.ZipArchiveEntriesCached.Add(fileCount)
}
func (a *zipArchive) findFile(name string) *zip.File {
@@ -230,6 +230,6 @@ func (a *zipArchive) Readlink(ctx context.Context, name string) (string, error)
// onEvicted called by the zipVFS.cache when an archive is removed from the cache
func (a *zipArchive) onEvicted(){
- metrics.ZipServingArchivesCurrentlyCached.Dec()
- metrics.ZipServingFilesPerZipArchiveCurrentlyCached.Sub(float64(len(a.files)))
+ metrics.ZipCachedArchives.Dec()
+ metrics.ZipArchiveEntriesCached.Sub(float64(len(a.files)))
}