-
Notifications
You must be signed in to change notification settings - Fork 68
HOWTO: Snapshot Interval
The purpose of the snapshot interval is to measure everything that happens between two distinct, defined points of time. In other words, if you are running a special test and want to measure the effect of this test (or whatever action you are performing it's good to define the start and the end point of the measurement sharp, and not wait for the next approx. update of an interval.
snapshot is a regular interval, just like any other intervals, but it is not updated automatically. You have to trigger an update manually. MoSKito Inspect offers an action for this:
http://host:port/context/moskito-inspect/mskForceIntervalUpdate?pInterval=snapshot
Note, that you can update any interval with this action, but of course its not recommended to update time based intervals like 1h.
The snapshot intervals are not limited to the one actually called snapshot. In fact you can add any amount of them, like snapshot1, snapshot2, snapshot6000. Of course each new interval will increase memory consumption, since all values which support this interval will hold a copy of their data for it.
IntervalRegistry registry = IntervalRegistry.getInstance();
Interval interval = registry.getInterval(intervalName);
((IUpdateable)interval).update();