Package jenkins.metrics.api
Class MetricsRootAction.Sampler
- java.lang.Object
-
- java.util.TimerTask
-
- hudson.triggers.SafeTimerTask
-
- hudson.model.PeriodicWork
-
- jenkins.metrics.api.MetricsRootAction.Sampler
-
- All Implemented Interfaces:
ExtensionPoint
,Runnable
- Enclosing class:
- MetricsRootAction
@Extension public static class MetricsRootAction.Sampler extends PeriodicWork
Sampler that captures an exponential sample of metrics snapshots.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetricsRootAction.Sampler.Sample
A sample.-
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnable
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
-
-
Constructor Summary
Constructors Constructor Description Sampler()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doRun()
static void
dynamicInstallHack()
long
getRecurrencePeriod()
static boolean
isEnabled()
Map<Date,Object>
sample()
Map<Date,Object>
sample(String prefix, String postfix)
-
Methods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, init
-
Methods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, run
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Method Detail
-
isEnabled
public static boolean isEnabled()
-
getRecurrencePeriod
public long getRecurrencePeriod()
- Specified by:
getRecurrencePeriod
in classPeriodicWork
-
doRun
protected void doRun() throws Exception
- Specified by:
doRun
in classSafeTimerTask
- Throws:
Exception
-
dynamicInstallHack
@Initializer(after=EXTENSIONS_AUGMENTED) @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public static void dynamicInstallHack()
-
-