Package de.hybris.platform.util
Class Perf
java.lang.Object
de.hybris.platform.util.Perf
-
Constructor Summary
Constructors -
Method Summary
-
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
- Throws:
Exception
-
go
Performsbody()with all available threads for the specified time.- Parameters:
ms- the time to run- Throws:
Exception
-
go
Performsbody()with a specific amount of threads for the specified time.- Parameters:
ms- the time to runthreadCount- 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()
-