Class PerformanceLogger

java.lang.Object
org.episteme.core.util.PerformanceLogger

public class PerformanceLogger extends Object
Lightweight utility for tracking high-performance computing metrics.

This logger tracks cumulative time execution counts for specific keys (e.g. "OpenCL:Transfer", "OpenCL:Compute"). It is designed to be minimal overhead.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • PerformanceLogger

      public PerformanceLogger()
  • Method Details

    • log

      public static void log(String key, String context, long durationNanos)
      Records a timing metric with context.
      Parameters:
      key - unique identifier
      context - descriptive context (e.g. "Dense/OpenCL")
      durationNanos - duration in nanoseconds
    • log

      public static void log(String key, long durationNanos)
      Records a timing metric.
      Parameters:
      key - unique identifier for the operation
      durationNanos - duration in nanoseconds
    • reset

      public static void reset()
      resets all metrics.
    • setEnabled

      public static void setEnabled(boolean e)
    • getReport

      public static String getReport()
      Returns a formatted report of all collected metrics.