Class Perf

java.lang.Object
de.hybris.platform.util.Perf

public abstract class Perf extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Perf(int poolThreads)
    Creates a new instance using Jalo scoped thread pool of specified size.
    Perf(int poolThreads, boolean useJalo)
    Creates a new instance using either Jalo or non-Jalo scoped thread pool of specified size.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
     
    void
     
    long
     
    void
    go(int ms)
    Performs body() with all available threads for the specified time.
    void
    go(int ms, int threadCount)
    Performs body() with a specific amount of threads for the specified time.
    void
     

    Methods inherited from class java.lang.Object

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

    • Perf

      public Perf(int poolThreads)
      Creates a new instance using Jalo scoped thread pool of specified size.
      Parameters:
      poolThreads - the number of thread to provide.
    • Perf

      public Perf(int poolThreads, boolean useJalo)
      Creates a new instance using either Jalo or non-Jalo scoped thread pool of specified size.
      Parameters:
      poolThreads - the number of thread to provide.
      useJalo - if true a Jalo scoped thread pool is used
  • Method Details

    • body

      public abstract void body() throws Exception
      Throws:
      Exception
    • go

      public void go(int ms) throws Exception
      Performs body() with all available threads for the specified time.
      Parameters:
      ms - the time to run
      Throws:
      Exception
    • go

      public void go(int ms, int threadCount) throws Exception
      Performs body() with a specific amount of threads for the specified time.
      Parameters:
      ms - the time to run
      threadCount - the number of threads to use - must be smaller or equal to number of available ones!
      Throws:
      Exception
    • close

      public void close()
    • getExecutions

      public long getExecutions()
    • reset

      public void reset()