Class MetricsExporter

java.lang.Object
io.jenkins.plugins.dorametrics.store.MetricsExporter

public class MetricsExporter extends Object
Builds metrics snapshots and delegates upload to the configured storage backend. Upload logic lives in each ExportStorageConfig implementation, not here.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Export a snapshot of the last 24 hours to the configured storage backend, logging rather than throwing if it fails.
    static int
    exportFinishedBetween(long afterMs, long untilMs)
    Exports the builds that finished after afterMs and up to untilMs, to a file named after the moment of the export so that no export overwrites another.
    static String
    exportFullDump(int days)
    Export a full dump for testing/debugging.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MetricsExporter

      public MetricsExporter()
  • Method Details

    • exportDailySnapshot

      public static void exportDailySnapshot()
      Export a snapshot of the last 24 hours to the configured storage backend, logging rather than throwing if it fails.
    • exportFinishedBetween

      public static int exportFinishedBetween(long afterMs, long untilMs) throws Exception
      Exports the builds that finished after afterMs and up to untilMs, to a file named after the moment of the export so that no export overwrites another. Throws when the export did not go through, so the caller can try the same window again.
      Returns:
      how many builds were exported; 0 when nothing finished in the window
      Throws:
      Exception
    • exportFullDump

      public static String exportFullDump(int days)
      Export a full dump for testing/debugging.