Class ExecutionStatistics


  • public class ExecutionStatistics
    extends Object

    ExecutionStatistics provides a simple system for storing the time taken to perform operations.

    Example usage:

     ExecutionStatistics.get().begin("Process-01");
     // ... your code to be timed goes here
     ExecutionStatistics.get().end("Process-01");
     

    Author:
    Jesse Sightler
    • Method Detail

      • get

        public static ExecutionStatistics get()
        Gets the instance associated with the current thread.
      • merge

        public void merge()
        Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific ThreadFactory in order to contain a reference to the parent thread.
      • reset

        public void reset()
        Clears the current threadlocal as well as any current state.
      • serializeTimingData

        public void serializeTimingData​(Path outputPath)
        Serializes the timing data to a "~" delimited file at outputPath.
      • performBenchmarked

        public static <T> T performBenchmarked​(String key,
                                               Task<T> operation)
      • begin

        public void begin​(String key)
        Start timing an operation with the given identifier.
      • end

        public void end​(String key)
        Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this will effectively be a noop.