Class Reports

java.lang.Object
org.acemq.workloads.report.Reports

public final class Reports extends Object
Renders runs as JSON, Markdown or HTML.

Why not PDF

PDF was asked for and is deliberately not here. Producing one needs a layout engine and its fonts — a large dependency in a tool whose whole output is a table and a list — and the result looks worse than what a browser prints. The HTML carries @media print rules, so printing it to PDF gives a better document than this could generate, with nothing added to the build.

JSON is the format that was not asked for and matters most. It is what a pipeline reads to decide whether to promote a build, what a dashboard graphs over time, and what lets two runs be compared without re-running either. HTML is for people and JSON is for everything else.

  • Method Details

    • toJson

      public static String toJson(List<WorkloadReport> reports)
      Parameters:
      reports - finished runs
      Returns:
      a machine-readable record of them
    • toJson

      public static String toJson(List<WorkloadReport> reports, List<RampReport> ramps)
      Parameters:
      reports - finished runs
      ramps - finished ramps
      Returns:
      a machine-readable record of them; ramps appears only when there are some
    • toMarkdown

      public static String toMarkdown(List<WorkloadReport> reports)
      Parameters:
      reports - finished runs
      Returns:
      the same, as Markdown
    • toMarkdown

      public static String toMarkdown(List<WorkloadReport> reports, List<RampReport> ramps)
      Parameters:
      reports - finished runs
      ramps - finished ramps
      Returns:
      the same, as Markdown
    • toHtml

      public static String toHtml(List<WorkloadReport> reports)
      Parameters:
      reports - finished runs
      Returns:
      a self-contained HTML page
    • toHtml

      public static String toHtml(List<WorkloadReport> reports, List<RampReport> ramps)
      Parameters:
      reports - finished runs
      ramps - finished ramps
      Returns:
      a self-contained HTML page