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-01-31 12:37:37 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-01-31 12:43:41 +0300
commit0d211f0df7b6bf735a2e6b909ce3ff37cd216962 (patch)
tree261e0e3f268fbe385399b10f66574f725214f755
parentf12848725da16faea4d00efd999e7ae3d090ac4e (diff)
housekeeping: Report recent loose objects
We're reporting both the loose objects count/size and the loose objects count/size for stale objects. But as the loose objects also include stale objects the result is that heatmmaps for lookse and loose stale objects look almost exactly the same as stale objects typically dominate the recent objects. Switch the metric to report recent loose objects instead of the overall loose object count, which is more useful.
-rw-r--r--internal/git/housekeeping/optimize_repository.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/git/housekeeping/optimize_repository.go b/internal/git/housekeeping/optimize_repository.go
index be4e6af2e..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_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)