Class ReportGenerator
java.lang.Object
de.cuioss.benchmarking.common.report.ReportGenerator
Generates HTML reports by creating a data JSON file and copying templates.
This generator now works in conjunction with ReportDataGenerator to:
- Generate a standardized benchmark-data.json file with all report data
- Copy HTML templates that load and render the JSON data
Templates use JavaScript to dynamically load and display the JSON data, making the system more maintainable and flexible.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopySupportFiles(String outputDir) Copies all necessary support files (CSS, JS, etc.) to the output directory.voidgenerateDetailedPage(String outputDir) Generates the detailed visualizer page.voidgenerateIndexPage(BenchmarkData benchmarkData, BenchmarkType benchmarkType, String outputDir) Generates the main index page and benchmark data.voidgenerateTrendsPage(String outputDir) Generates the trends page.
-
Constructor Details
-
ReportGenerator
public ReportGenerator()Creates a ReportGenerator.
-
-
Method Details
-
generateIndexPage
public void generateIndexPage(BenchmarkData benchmarkData, BenchmarkType benchmarkType, String outputDir) throws IOException Generates the main index page and benchmark data.- Parameters:
benchmarkData- the benchmark data to generate reports frombenchmarkType- the type of benchmark being processedoutputDir- the output directory for HTML files- Throws:
IOException- if writing files fails
-
generateTrendsPage
Generates the trends page.- Parameters:
outputDir- the output directory for HTML files- Throws:
IOException- if writing HTML files fails
-
generateDetailedPage
Generates the detailed visualizer page.- Parameters:
outputDir- the output directory for HTML files- Throws:
IOException- if writing HTML files fails
-
copySupportFiles
Copies all necessary support files (CSS, JS, etc.) to the output directory.- Parameters:
outputDir- the output directory- Throws:
IOException- if copying files fails
-