use of org.apache.jackrabbit.api.stats.TimeSeries in project jackrabbit-oak by apache.
the class DefaultStatisticsProviderTest method getRegisteredTimeSeries.
private Set<String> getRegisteredTimeSeries(DefaultStatisticsProvider statsProvider) {
RepositoryStatisticsImpl stats = (RepositoryStatisticsImpl) statsProvider.getStats();
Set<String> names = new HashSet<String>();
for (Map.Entry<String, TimeSeries> e : stats) {
names.add(e.getKey());
}
return names;
}
use of org.apache.jackrabbit.api.stats.TimeSeries in project jackrabbit-oak by apache.
the class SimpleStatsTest method noopRepoStatsTest.
@Test
public void noopRepoStatsTest() throws Exception {
RepositoryStatistics stats = StatisticsProvider.NOOP.getStats();
assertNotNull(stats);
assertNotNull(stats.getTimeSeries("foo", false));
assertNotNull(stats.getTimeSeries(RepositoryStatistics.Type.QUERY_COUNT));
TimeSeries ts = stats.getTimeSeries("foo", false);
assertNotNull(ts.getValuePerHour());
assertNotNull(ts.getValuePerMinute());
assertNotNull(ts.getValuePerSecond());
assertNotNull(ts.getValuePerWeek());
assertEquals(0, ts.getMissingValue());
}
Aggregations