]> source.dussan.org Git - jgit.git/commit
DfsBlockCache: refactor stats implementations. 51/1202651/11
authorLaura Hamelin <haowl@google.com>
Wed, 16 Oct 2024 22:16:00 +0000 (15:16 -0700)
committerIvan Frade <ifrade@google.com>
Mon, 21 Oct 2024 19:05:32 +0000 (19:05 +0000)
commitfe8919d107cbfbc52b84f9b8e9fe55668dfbebb1
treece3c6beae92db089d6127518fb2a7ec88120835b
parent7fed42f860d2af49365283e6fba9a3a2dba9ea53
DfsBlockCache: refactor stats implementations.

The stats interface has an implementation in the interface itself and another inside the PackExtBlockCache class. This asymmetry gets on the way to implement stats-per-table later.

Make DfsBlockCacheStats (the stats of a single table) a top-level class and create an aggregator class to combine multiple stats. This makes the stats classes mirror the table classes structure (singles tables + composite).

This change is part of a refactor to support providing detailed stats
breakdowns for cache implementations using multiple table instances
while keeping the existing "aggregated" view of cache stats.

Change-Id: I79c11e4ea24afe4b449efdbb47bc81eed363ffd3
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/AggregatedBlockCacheStatsTest.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/PackExtBlockCacheTableTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/AggregatedBlockCacheStats.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheStats.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTable.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackExtBlockCacheTable.java