|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.LoadStatistics
@ExportedBean public abstract class LoadStatistics
Utilization statistics for a node or a set of nodes.
Instances of this class is not capable of updating the statistics itself
— instead, it's done by the LoadStatistics.LoadStatisticsUpdater
timer.
This is more efficient (as it allows us a single pass to update all stats),
but it's not clear to me if the loss of autonomy is worth it.
Label.loadStatistics
,
Jenkins.overallLoad
,
Jenkins.unlabeledLoad
Nested Class Summary | |
---|---|
static class |
LoadStatistics.LoadStatisticsUpdater
Periodically update the load statistics average. |
Field Summary | |
---|---|
MultiStageTimeSeries |
busyExecutors
Number of busy executors and how it changes over time. |
static int |
CLOCK
Load statistics clock cycle in milliseconds. |
static float |
DECAY
With 0.90 decay ratio for every 10sec, half reduction is about 1 min. |
MultiStageTimeSeries |
queueLength
Number of Queue.BuildableItem s that can run on any node in this node set but blocked. |
MultiStageTimeSeries |
totalExecutors
Number of total executors and how it changes over time. |
Constructor Summary | |
---|---|
protected |
LoadStatistics(int initialTotalExecutors,
int initialBusyExecutors)
|
Method Summary | |
---|---|
abstract int |
computeIdleExecutors()
Computes the # of idle executors right now and obtains the snapshot value. |
abstract int |
computeQueueLength()
Computes the # of queue length right now and obtains the snapshot value. |
abstract int |
computeTotalExecutors()
Computes the # of total executors right now and obtains the snapshot value. |
protected void |
configureRenderer(org.jfree.chart.renderer.category.LineAndShapeRenderer renderer)
|
org.jfree.chart.JFreeChart |
createChart(org.jfree.data.category.CategoryDataset ds)
Creates a trend chart. |
MultiStageTimeSeries.TrendChart |
createTrendChart(MultiStageTimeSeries.TimeScale timeScale)
Creates CategoryDataset which then becomes the basis
of the load statistics graph. |
MultiStageTimeSeries.TrendChart |
doGraph(String type)
Generates the load statistics graph. |
Api |
getApi()
|
float |
getLatestIdleExecutors(MultiStageTimeSeries.TimeScale timeScale)
|
protected void |
updateExecutorCounts()
Updates totalExecutors and busyExecutors by using
the current snapshot value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Exported public final MultiStageTimeSeries busyExecutors
@Exported public final MultiStageTimeSeries totalExecutors
@Exported public final MultiStageTimeSeries queueLength
Queue.BuildableItem
s that can run on any node in this node set but blocked.
public static final float DECAY
public static int CLOCK
Constructor Detail |
---|
protected LoadStatistics(int initialTotalExecutors, int initialBusyExecutors)
Method Detail |
---|
public float getLatestIdleExecutors(MultiStageTimeSeries.TimeScale timeScale)
public abstract int computeIdleExecutors()
public abstract int computeTotalExecutors()
public abstract int computeQueueLength()
public org.jfree.chart.JFreeChart createChart(org.jfree.data.category.CategoryDataset ds)
protected void configureRenderer(org.jfree.chart.renderer.category.LineAndShapeRenderer renderer)
public MultiStageTimeSeries.TrendChart createTrendChart(MultiStageTimeSeries.TimeScale timeScale)
CategoryDataset
which then becomes the basis
of the load statistics graph.
public MultiStageTimeSeries.TrendChart doGraph(@QueryParameter String type) throws IOException
IOException
public Api getApi()
protected void updateExecutorCounts()
totalExecutors
and busyExecutors
by using
the current snapshot value.
queueLength
is updated separately via LoadStatistics.LoadStatisticsUpdater
to
improve the efficiency because we are counting this for all LoadStatistics
at once.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |