/** * Called when this sampler has spent some time working and wants * it to be accounted for. */ private void accountForTimeSpentWorking(long nanosSpentWorking, long nanosSpentSleeping) { this.samplerStats.tookSample( nanosSpentWorking, getStatisticsManager().getStatisticsCount(), nanosSpentSleeping); }
/** * Called when this sampler has spent some time working and wants * it to be accounted for. */ private void accountForTimeSpentWorking(long nanosSpentWorking, long nanosSpentSleeping) { this.samplerStats.tookSample( nanosSpentWorking, getStatisticsManager().getStatisticsCount(), nanosSpentSleeping); }
assertEquals(true, statSampler.isSamplingEnabled()); int statsCount = statSampler.getStatisticsManager().getStatisticsCount(); assertEquals(statsCount, statSampler.getStatisticsManager().getStatisticsCount()); assertEquals(statsCount, statSampler.getStatistics().length);
assertEquals(true, statSampler.isSamplingEnabled()); int statsCount = statSampler.getStatisticsManager().getStatisticsCount(); assertEquals(statsCount, statSampler.getStatisticsManager().getStatisticsCount()); assertEquals(statsCount, statSampler.getStatistics().length);