public abstract class Perf
extends java.lang.Object
| Constructor and 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.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
body() |
void |
close() |
long |
getExecutions() |
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 |
reset() |
public Perf(int poolThreads)
poolThreads - the number of thread to provide.public Perf(int poolThreads,
boolean useJalo)
poolThreads - the number of thread to provide.useJalo - if true a Jalo scoped thread pool is usedpublic abstract void body()
throws java.lang.Exception
java.lang.Exceptionpublic void go(int ms)
throws java.lang.Exception
body() with all available threads for the specified time.ms - the time to runjava.lang.Exceptionpublic void go(int ms,
int threadCount)
throws java.lang.Exception
body() with a specific amount of threads for the specified time.ms - the time to runthreadCount - the number of threads to use - must be smaller or equal to number of available ones!java.lang.Exceptionpublic void close()
public long getExecutions()
public void reset()
Copyright © 2018 SAP SE. All Rights Reserved.