Package org.xipki.util
Class BenchmarkExecutor
- java.lang.Object
-
- org.xipki.util.BenchmarkExecutor
-
public abstract class BenchmarkExecutor extends Object
Benchmark executor.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPKEY_BENCHMARK
-
Constructor Summary
Constructors Constructor Description BenchmarkExecutor(String description)BenchmarkExecutor(String description, int total)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccount(long all, long failed)voidclose()voidexecute()longgetErrorAccount()protected longgetRealAccount(long account)protected static longgetSecureIndex()protected abstract RunnablegetTester()intgetThreads()booleanisInterrupted()protected voidprintHeader()protected voidprintStatus()protected voidprintSummary()protected voidresetStartTime()BenchmarkExecutorsetDuration(String duration)BenchmarkExecutorsetThreads(int threads)BenchmarkExecutorsetUnit(String unit)protected booleanstop()
-
-
-
Field Detail
-
PROPKEY_BENCHMARK
public static final String PROPKEY_BENCHMARK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRealAccount
protected long getRealAccount(long account)
-
close
public void close()
-
execute
public void execute()
-
isInterrupted
public boolean isInterrupted()
-
setDuration
public BenchmarkExecutor setDuration(String duration)
-
setThreads
public BenchmarkExecutor setThreads(int threads)
-
getErrorAccount
public long getErrorAccount()
-
account
public void account(long all, long failed)
-
getThreads
public int getThreads()
-
resetStartTime
protected void resetStartTime()
-
stop
protected boolean stop()
-
printHeader
protected void printHeader()
-
printStatus
protected void printStatus()
-
setUnit
public BenchmarkExecutor setUnit(String unit)
-
printSummary
protected void printSummary()
-
getSecureIndex
protected static long getSecureIndex()
-
-