public class Measurement<T> extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Measurement.Builder<T> |
Constructor and Description |
---|
Measurement(int numberOfThreads,
int numberOfCalls) |
Measurement(int numberOfThreads,
int numberOfCalls,
int batchSize) |
Measurement(long maxTestTime,
int numberOfThreads,
int numberOfCalls,
int batchSize) |
Measurement(Measurement result) |
public Measurement(int numberOfThreads, int numberOfCalls)
public Measurement(int numberOfThreads, int numberOfCalls, int batchSize)
public Measurement(long maxTestTime, int numberOfThreads, int numberOfCalls, int batchSize)
public Measurement(Measurement result)
public boolean isRegression()
public boolean isFailOnRegression()
public boolean shouldFail()
public void setRegression(boolean regression)
public void setContext(T value)
public T getContext()
public int getNumberOfMeasurements()
public int getNumberOfThreads()
public int getNumberOfCalls()
public int getBatchSize()
public long getTotalMillis()
public long getOne()
public void setTotalMillis(long totalMillis)
public double getThroughput()
public int getNumberOfErrors()
public void setNumberOfErrors(int numberOfErrors)
public void incrementErrorCount()
public void incrementErrorCount(int delta)
public void setInfo(String info)
public String getInfo()
public void cancel(boolean mayInterruptIfRunning)
mayInterruptIfRunning
- if false then any running calls to @see Worker#doWork will be allowed to finish
before the the measurement is cancelled.public void cancel(String reason, boolean mayInterruptIfRunning)
reason
- the reason for the cancelationmayInterruptIfRunning
- if false then any running calls to @see Worker#doWork will be allowed to finish
before the the measurement is cancelled.public boolean isCancelled()
public boolean isMayInterruptIfRunning()
public long getMaxTestTime()
public int getNumberOfWarmupCalls()
public boolean isTimedOut()
getMaxTestTime()
public Measurement<T> measure(WorkerWorkload<T> workload)
public Measurement<T> measure(WorkerLifecycle<T> lifecycle, WorkerWorkload<T> workload)
public void setException(Exception exception)
public Exception getException()
Copyright © 2021 JBoss by Red Hat. All rights reserved.