Class ReportDataGenerator

java.lang.Object
de.cuioss.benchmarking.common.report.ReportDataGenerator

public class ReportDataGenerator extends Object
Generates a standardized JSON data file containing all report data that can be consumed by HTML templates via JavaScript.

This generator consolidates all benchmark data and metrics into a single JSON file named "benchmark-data.json" that templates load and process.

The generated JSON structure includes:

  • Metadata (timestamp, benchmark type, etc.)
  • Overview metrics (totals, averages, grades)
  • Detailed benchmark results
  • Chart data for visualizations
  • Trend data for historical analysis
  • Constructor Details

  • Method Details

    • generateDataFile

      public void generateDataFile(BenchmarkData benchmarkData, BenchmarkType type, String outputDir) throws IOException
      Generates a comprehensive data file for report templates using BenchmarkData.
      Parameters:
      benchmarkData - the benchmark data to generate reports from
      type - the benchmark type
      outputDir - the output directory
      Throws:
      IOException - if writing fails