Class APIUsageHelper
java.lang.Object
org.deltava.beans.stats.APIUsageHelper
A utility class to predict API usage.
- Since:
- 9.0
- Version:
- 9.0
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the number of days remaining in the month, including today.static APIUsage
Calculates today's predicted API usage.static APIUsage
predictUsage
(Collection<APIUsage> history, String name) Calculates predicted API usage for the rest of the month, based on prior usage.
-
Method Details
-
predictUsage
Calculates predicted API usage for the rest of the month, based on prior usage.- Parameters:
history
- a Collection of APIUsage beansname
- the API/method name- Returns:
- an APIUsage with the expected total/anonymous usage for the month
-
predictToday
-
getDaysLeftInMonth
public static int getDaysLeftInMonth()Returns the number of days remaining in the month, including today.- Returns:
- the number of days
-