Class TrendDataProcessor

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

public class TrendDataProcessor extends Object
Processes historical benchmark data for time-series analysis and trend visualization.

This processor specializes in time-series analysis of benchmark results:

  • Loading and managing historical benchmark data
  • Detecting performance trends over time
  • Preparing data for trend visualization charts
  • Tracking changes between benchmark runs

Use this class when you need to analyze benchmark performance over time. For pure statistical computations, use StatisticsCalculator. For processing individual benchmark results, use MetricsComputer.

See Also:
  • Constructor Details

  • Method Details

    • loadHistoricalData

      Loads historical data files from the history directory.
      Parameters:
      historyDir - path to the history directory
      Returns:
      list of historical benchmark data points, sorted by timestamp (newest first)
    • calculateTrends

      Calculates trend metrics from historical data using EWMA (Exponentially Weighted Moving Average).

      EWMA provides a weighted baseline that emphasizes recent performance while still considering historical context. This prevents false negatives when comparing identical consecutive runs after a major performance shift.

      Parameters:
      currentMetrics - current benchmark metrics
      historicalData - previous benchmark results (ordered newest first)
      Returns:
      trend metrics with analysis
    • generateTrendChartData

      Generates chart-ready trend data for visualization.
      Parameters:
      historicalData - historical benchmark results
      currentMetrics - current benchmark metrics (optional)
      Returns:
      map containing chart labels and datasets