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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-02-01 11:45:22 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-02-01 11:45:22 +0300
commitba63ee19fb2dafe6f2ca5bca5d12a0b24837ce17 (patch)
treea14a6d0142436119679751ee712276ac36560f50
parent080916e6ba9dc013775ee83a52aba46fcd04de00 (diff)
parent0d211f0df7b6bf735a2e6b909ce3ff37cd216962 (diff)
Merge branch 'pks-git-stats-improve-metrics' into 'master'
housekeeping: Further iterate on the data structure metrics See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5313 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Justin Tobler <jtobler@gitlab.com>
-rw-r--r--internal/git/housekeeping/manager.go4
-rw-r--r--internal/git/housekeeping/optimize_repository.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/internal/git/housekeeping/manager.go b/internal/git/housekeeping/manager.go
index 27fd3ed57..1ca976c3f 100644
--- a/internal/git/housekeeping/manager.go
+++ b/internal/git/housekeeping/manager.go
@@ -72,7 +72,7 @@ func NewManager(promCfg gitalycfgprom.Config, txManager transaction.Manager) *Re
prometheus.HistogramOpts{
Name: "gitaly_housekeeping_data_structure_count",
Help: "Total count of the data structures that exist in the repository",
- Buckets: prometheus.ExponentialBucketsRange(1, 10_000_000, 16),
+ Buckets: prometheus.ExponentialBucketsRange(1, 10_000_000, 32),
},
[]string{"data_structure"},
),
@@ -80,7 +80,7 @@ func NewManager(promCfg gitalycfgprom.Config, txManager transaction.Manager) *Re
prometheus.HistogramOpts{
Name: "gitaly_housekeeping_data_structure_size",
Help: "Total size of the data structures that exist in the repository",
- Buckets: prometheus.ExponentialBucketsRange(1, 50_000_000_000, 16),
+ Buckets: prometheus.ExponentialBucketsRange(1, 50_000_000_000, 32),
},
[]string{"data_structure"},
),
diff --git a/internal/git/housekeeping/optimize_repository.go b/internal/git/housekeeping/optimize_repository.go
index 17754996a..083b3f8c6 100644
--- a/internal/git/housekeeping/optimize_repository.go
+++ b/internal/git/housekeeping/optimize_repository.go
@@ -87,14 +87,14 @@ func (m *RepositoryManager) reportRepositoryInfo(ctx context.Context, info stats
m.reportDataStructureExistence("multi_pack_index", info.Packfiles.HasMultiPackIndex)
m.reportDataStructureExistence("multi_pack_index_bitmap", info.Packfiles.MultiPackIndexBitmap.Exists)
- m.reportDataStructureCount("loose_objects", info.LooseObjects.Count)
- m.reportDataStructureCount("loose_objects_stale_count", info.LooseObjects.StaleCount)
+ m.reportDataStructureCount("loose_objects_recent", info.LooseObjects.Count-info.LooseObjects.StaleCount)
+ m.reportDataStructureCount("loose_objects_stale", info.LooseObjects.StaleCount)
m.reportDataStructureCount("commit_graph_chain", info.CommitGraph.CommitGraphChainLength)
m.reportDataStructureCount("packfiles", info.Packfiles.Count)
m.reportDataStructureCount("packfiles_reverse_indices", info.Packfiles.ReverseIndexCount)
m.reportDataStructureCount("loose_references", info.References.LooseReferencesCount)
- m.reportDataStructureSize("loose_objects", info.LooseObjects.Size)
+ m.reportDataStructureSize("loose_objects_recent", info.LooseObjects.Size-info.LooseObjects.StaleSize)
m.reportDataStructureSize("loose_objects_stale", info.LooseObjects.StaleSize)
m.reportDataStructureSize("packfiles", info.Packfiles.Size)
m.reportDataStructureSize("packed_references", info.References.PackedReferencesSize)