Use WindowCacheStats from JGit
Since [1] JGit exposes a public class WindowCacheStats, allowing to access the statistics from WindowCache which is not a public API. Remove the WindowCacheStatAccessor and use the new API instead. [1] https://git.eclipse.org/r/#/c/116501/ Change-Id: I73dff00c309efd37030c02af91e7e7643b9b3751
This commit is contained in:
@@ -18,7 +18,7 @@ import com.google.common.base.Supplier;
|
||||
import com.google.gerrit.metrics.Description;
|
||||
import com.google.gerrit.metrics.Description.Units;
|
||||
import com.google.gerrit.metrics.MetricMaker;
|
||||
import org.eclipse.jgit.internal.storage.file.WindowCacheStatAccessor;
|
||||
import org.eclipse.jgit.storage.file.WindowCacheStats;
|
||||
|
||||
public class JGitMetricModule extends MetricModule {
|
||||
@Override
|
||||
@@ -32,7 +32,7 @@ public class JGitMetricModule extends MetricModule {
|
||||
new Supplier<Long>() {
|
||||
@Override
|
||||
public Long get() {
|
||||
return WindowCacheStatAccessor.getOpenBytes();
|
||||
return WindowCacheStats.getOpenBytes();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ public class JGitMetricModule extends MetricModule {
|
||||
new Supplier<Integer>() {
|
||||
@Override
|
||||
public Integer get() {
|
||||
return WindowCacheStatAccessor.getOpenFiles();
|
||||
return WindowCacheStats.getOpenFiles();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user