Package perf

Class MeasurePerformance

java.lang.Object
perf.MeasurePerformance

public class MeasurePerformance extends Object
Simple micro-benchmark for evaluating performance of various UUID generation techniques, including JDK's method as well as JUG's versions.

Notes: for name-based version we will pass plain Strings, assuming this is the most common use case; even though it is possible to also pass raw byte arrays. JDK and Jug implementations have similar performance so this only changes relative speeds of name- vs time-based versions.

Since:
3.1
  • Field Details

    • NAME_STRING

      private static final String NAME_STRING
      See Also:
    • NAME_BYTES

      private static final byte[] NAME_BYTES
    • COUNT

      private static final int COUNT
      See Also:
    • DEFAULT_ROUNDS

      private static final int DEFAULT_ROUNDS
      See Also:
    • rounds

      private final int rounds
    • runForever

      private final boolean runForever
  • Constructor Details

    • MeasurePerformance

      public MeasurePerformance()
    • MeasurePerformance

      public MeasurePerformance(int rounds, boolean runForever)
  • Method Details