Class MetricsOrchestrator

java.lang.Object
de.cuioss.benchmarking.common.metrics.MetricsOrchestrator

public class MetricsOrchestrator extends Object
Orchestrator for metrics processing. Coordinates the transformation and export of real-time Prometheus metrics. Delegates all transformation logic to BenchmarkMetricsTransformer.
  • Constructor Details

    • MetricsOrchestrator

      public MetricsOrchestrator(PrometheusClient prometheusClient)
      Creates a new metrics orchestrator.
      Parameters:
      prometheusClient - PrometheusClient for real-time metrics collection
  • Method Details

    • collectBenchmarkMetrics

      public void collectBenchmarkMetrics(String benchmarkName, Instant startTime, Instant endTime, Path outputDir) throws IOException
      Collects real-time metrics from Prometheus for a benchmark execution. Fetches time-series data, calculates statistics (avg, p50, p95, max), and exports to JSON format.
      Parameters:
      benchmarkName - Name of the benchmark for file naming
      startTime - Start time of the benchmark execution
      endTime - End time of the benchmark execution
      outputDir - Directory to store the metrics JSON file
      Throws:
      IOException - if I/O operations fail