this.cacheStats.getLoadTime() - this.prevLoadTime; long deltaLoadsCompleted = this.cacheStats.getLoadsCompleted() - this.prevLoadsCompleted;
/** * Updates the previous values of statistics */ private void updatePrevious() { if (this.cacheStats != null && !this.cacheStats.isClosed()) { this.prevLoadTime = this.cacheStats.getLoadTime(); this.prevLoadsCompleted = this.cacheStats.getLoadsCompleted(); this.prevNetsearchTime = this.cacheStats.getNetsearchTime(); this.prevNetsearchesCompleted = this.cacheStats.getNetsearchesCompleted(); this.prevGets = this.cacheStats.getGets(); } else { this.prevLoadTime = 0L; this.prevLoadsCompleted = 0L; this.prevNetsearchTime = 0L; this.prevNetsearchesCompleted = 0L; this.prevGets = 0L; } }
/** * Updates the previous values of statistics */ private void updatePrevious() { if (this.cacheStats != null && !this.cacheStats.isClosed()) { this.prevLoadTime = this.cacheStats.getLoadTime(); this.prevLoadsCompleted = this.cacheStats.getLoadsCompleted(); this.prevNetsearchTime = this.cacheStats.getNetsearchTime(); this.prevNetsearchesCompleted = this.cacheStats.getNetsearchesCompleted(); this.prevGets = this.cacheStats.getGets(); } else { this.prevLoadTime = 0L; this.prevLoadsCompleted = 0L; this.prevNetsearchTime = 0L; this.prevNetsearchesCompleted = 0L; this.prevGets = 0L; } }
if (deltaGets != 0) { long deltaLoadsCompleted = this.cacheStats.getLoadsCompleted() - this.prevLoadsCompleted; long deltaNetsearchesCompleted = this.cacheStats.getNetsearchesCompleted() -
if (deltaGets != 0) { long deltaLoadsCompleted = this.cacheStats.getLoadsCompleted() - this.prevLoadsCompleted; long deltaNetsearchesCompleted = this.cacheStats.getNetsearchesCompleted() -
this.cacheStats.getLoadTime() - this.prevLoadTime; long deltaLoadsCompleted = this.cacheStats.getLoadsCompleted() - this.prevLoadsCompleted;
long firstLoadsCompleted = stats.getLoadsCompleted(); assertTrue(firstLoadTime >= 0); assertTrue(firstLoadsCompleted > 0); long secondLoadsCompleted = stats.getLoadsCompleted(); assertTrue("firstLoadTime=" + firstLoadTime + ", secondLoadTime=" + secondLoadTime, secondLoadTime >= firstLoadTime); assertTrue(secondLoadsCompleted > firstLoadsCompleted); long thirdLoadsCompleted = stats.getLoadsCompleted(); assertTrue(thirdLoadTime > secondLoadTime); assertTrue(thirdLoadsCompleted > secondLoadsCompleted);