Class BuildChartAction
java.lang.Object
org.jenkinsci.plugins.vmanager.charts.BuildChartAction
- All Implemented Interfaces:
Action,ModelObject
Build-level action that adds a "vManager Charts" link to every individual
build's left sidebar. The page hosts one or more build-scope charts.
Currently the page hosts a single chart, the Regression Optimization Chart — a scatter of all runs in the build's vManager session(s), bucketed by duration into Small (green), Medium (orange) and Large (red) thirds. Additional build-level charts can be added to the same page over time.
The chart's data is computed at the end of each build by
CustomMetricsRunListener and stored on the build as a
RegressionOptimizationBuildAction; this action simply hands that
stored data to the front-end ECharts code via a Stapler proxy.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classResult returned to the front-end Stapler proxy.static final classResult returned to the front-end Stapler proxy for the Run Anomalies chart: a fixed 4-category × 3-stack matrix (Duration / CPU Time / Max Memory / Avg Memory, each split into None / Unknown / Anomaly). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoSaveLayout(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Current persisted build-page layout, opaque JSON;"{}"if none.Page heading: "vManager Charts for build #N".Stapler/JS-callable: returns the Runs Duration chart data that was fetched and stored on this build at build-completion time.Run<?, ?> getRun()Stapler/JS-callable: returns the Run Anomalies chart data that was fetched and stored on this build at build-completion time.vManager session names this build was associated with (resolved from.sessions.inputor, as a fallback,.session_launch.output).Per-session warning text (e.g.booleanWhether the current user may persist a new layout for this page.booleanWhether the Regression Optimization Chart is enabled on the parent job.booleanWhether the Run Anomalies Chart is enabled on the parent job.
-
Constructor Details
-
BuildChartAction
-
-
Method Details
-
getRun
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getPageHeading
Page heading: "vManager Charts for build #N". -
isShowRegressionOptimizationChart
public boolean isShowRegressionOptimizationChart()Whether the Regression Optimization Chart is enabled on the parent job. -
isShowRunAnomaliesChart
public boolean isShowRunAnomaliesChart()Whether the Run Anomalies Chart is enabled on the parent job. -
getSessions
vManager session names this build was associated with (resolved from.sessions.inputor, as a fallback,.session_launch.output). Returns an empty list when no build-level chart data was recorded yet. Exposed to the build-level charts page so it can list them under the heading. -
getSessionWarnings
Per-session warning text (e.g. TAT misconfiguration). Sessions without a warning are absent from the returned map. Exposed to the build-level charts page so it can render an inline disclaimer next to each session name. -
getRegressionOptimizationData
@JavaScriptMethod public BuildChartAction.RegressionOptimizationData getRegressionOptimizationData()Stapler/JS-callable: returns the Runs Duration chart data that was fetched and stored on this build at build-completion time. -
getRunAnomaliesData
Stapler/JS-callable: returns the Run Anomalies chart data that was fetched and stored on this build at build-completion time. -
getLayoutJson
Current persisted build-page layout, opaque JSON;"{}"if none. -
isCanConfigure
public boolean isCanConfigure()Whether the current user may persist a new layout for this page. -
doSaveLayout
public void doSaveLayout(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException - Throws:
IOException
-