]> source.dussan.org Git - jgit.git/commit
WindowCache: add metric for cached bytes per repository 73/155173/7
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 3 Jan 2020 17:16:42 +0000 (18:16 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 28 Jan 2020 10:24:06 +0000 (11:24 +0100)
commit1f9c717ff709e26d44090bc1b71be7c4c2b2a0fd
tree90270201ed927f924bab635ff52b46b325e97fad
parent187b7ad72e97adb3b20aea3b44c3f23c451ea190
WindowCache: add metric for cached bytes per repository

Since ObjectDatabase and PackFile don't know their repository use the
packfile's grand-grand-parent directory as an identifier for the
repository the packfile resides in.

Remove metric for a repository if the number of cached bytes for the
repository drops to 0 in order to ensure the map of cached bytes per
repository doesn't contain repositories which have no data cached in the
WindowCache.

Change-Id: I969ab8029db0a292e7585cbb36ca0baa797da20b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheStats.java