|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.measurement.TimingVoodoo
public final class TimingVoodoo
This helper class is full of "voodoo" functions related to synchronizing timed data between the agent and the server. We call them "voodoo" because they deal mostly with rounding down and guestimating percentages.
Method Summary | |
---|---|
static long[] |
aggregate(long approxTime,
long interval,
int backTicks)
Compute the upper and lower bound that should be used in the SQL query for finding the collected data points based on the approximate time they were taken, the interval and how many intervals of data are being considered in the aggregate function. |
static long |
closestTime(long approxTime,
long interval)
Given the approximate time associated with a data point and the interval at which that adta point is being collected, compute the exact data point to which the data point corresponds. |
static long[] |
current(long approxTime,
long interval)
Compute the upper and lower bound that should be used in the SQL query for finding the collected data points based on the approximate time they were taken and the interval. |
static long |
percOfInterval(long interval)
Compute (in milliseconds) what is considered the latency percentage based on the interval. |
static long[] |
previous(long approxTime,
long interval,
int backTicks)
Compute the upper and lower bound that should be used in the SQL query for finding the collected data points based on the approximate time they were taken, the interval and how many intervals ago the data was collected. |
static long |
roundDownTime(long approxTime,
long interval)
Given the approximate time associated with a data point and the interval at which that adta point is being collected, compute the exact data point to which the data point corresponds. |
static long |
roundUpTime(long approxTime,
long interval)
Given the approximate time and interval, round the time up to the nearest timestamp that coincides with the interval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long roundDownTime(long approxTime, long interval)
approxTime
- the approximate time to which the data point correspondsinterval
- the collection interval
public static long roundUpTime(long approxTime, long interval)
approxTime
- the approximate timeinterval
- the collection interval
public static long closestTime(long approxTime, long interval)
approxTime
- the approximate time to which the data point correspondsinterval
- the collection interval
public static long[] current(long approxTime, long interval)
approxTime
- the approximate time the data points were collectedinterval
- the collection interval
public static long[] previous(long approxTime, long interval, int backTicks)
approxTime
- the approximate time the data points were collectedinterval
- the collection interval
public static long[] aggregate(long approxTime, long interval, int backTicks)
approxTime
- the approximate time the data points were collectedinterval
- the collection interval
public static long percOfInterval(long interval)
interval
- the collection interval
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |