Class MetricReport

java.lang.Object
io.jenkins.plugins.interactiveinput.output.MetricReport
All Implemented Interfaces:
Serializable

public class MetricReport extends Object implements Serializable
A named group of Metrics published by one interactiveOutput call (e.g. "Cost report" or "Carbon footprint"). A build may hold several reports; they are stored in the build's InteractiveOutputBuildAction and therefore persisted in build.xml via XStream.
See Also:
  • Field Details

    • CHART_LINE

      public static final String CHART_LINE
      Cross-build trend as a line chart (default).
      See Also:
    • CHART_BAR

      public static final String CHART_BAR
      Cross-build trend as a grouped bar chart.
      See Also:
    • CHART_PIE

      public static final String CHART_PIE
      The latest build's numeric metrics as a pie chart.
      See Also:
    • CHART_TIMESERIES

      public static final String CHART_TIMESERIES
      The latest build's metrics as a time series, when each metric's LABEL is a date/timestamp (e.g. 2026-07-01). Points are emitted sorted by date and can be re-bucketed (day/month/year) client-side. Labels that do not parse as a date are skipped.
      See Also:
  • Constructor Details

    • MetricReport

      public MetricReport(@NonNull String name, @NonNull List<Metric> metrics, long createdTs)
    • MetricReport

      public MetricReport(@NonNull String name, @NonNull List<Metric> metrics, long createdTs, @CheckForNull String chartType)
  • Method Details

    • getName

      @NonNull public String getName()
    • getChartType

      @NonNull public String getChartType()
      Returns:
      the report's chart type, defaulting legacy/blank/unknown values to CHART_LINE.
    • getMetrics

      @NonNull public List<Metric> getMetrics()
    • getCreatedTs

      public long getCreatedTs()
    • getCreatedDate

      @NonNull public Date getCreatedDate()