Class StatsService
java.lang.Object
edu.ucsb.cs156.diningcachingproxy.services.StatsService
In-memory counters tracking cache performance since the proxy was started up. Reset on restart —
durable persistence of these stats may come later.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongdoublelongvoidvoid
-
Constructor Details
-
StatsService
public StatsService()
-
-
Method Details
-
recordHit
public void recordHit() -
recordMiss
public void recordMiss() -
getTotalRequests
public long getTotalRequests() -
getCacheHits
public long getCacheHits() -
getCacheMisses
public long getCacheMisses() -
getHitRatePercentage
public double getHitRatePercentage()
-