public interface OperationRun extends Comparable<OperationRun>
Modifier and Type | Field and Description |
---|---|
static long |
NOT_YET_RUN
Constant used to indicate that an operation has not yet been run and thus
the statistic retrieved is not available
|
static long |
UNKNOWN
Constant used to indicate that an operation has some unknown statistic
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCategory()
Gets an integer identifying the category of error
|
String |
getErrorMessage()
Gets the error message associated with the operation run, will be null if
the operation ran successfully
|
int |
getId()
Gets the ID for the operation (if known)
|
long |
getResponseTime()
Gets the response time in nanoseconds
|
long |
getResultCount()
Gets the number of results returned for operations to which this is
applicable
|
long |
getRunOrder()
Gets the global run order for this operation run
|
long |
getRuntime()
Gets the runtime in nanoseconds
|
void |
setId(int id)
Sets the ID for the operation
|
void |
setRunOrder(long order)
Sets the global run order for this operation run
|
boolean |
wasSuccessful()
Returns whether this run represents a successful (i.e.
|
compareTo
static final long NOT_YET_RUN
static final long UNKNOWN
long getRuntime()
long getResponseTime()
Response Time is an additional metric which currently is only calculated
for certain operations. This metric is the time taken for the first
results of the operation to become available so where the operation
receives a streamed response this may be much smaller than the
getRuntime()
statistic.
long getResultCount()
boolean wasSuccessful()
String getErrorMessage()
int getErrorCategory()
Some basic categories are provided by ErrorCategories
and the
return type of this method is explicitly an int
rather than some
category enum
in order to allow users of the API to define their
own error categories for their custom operations.
long getRunOrder()
This is the order the operation was run in relative to all other operations run in the benchmark and is primarily useful when looking at the results of multi-threaded benchmarks.
void setRunOrder(long order) throws IllegalAccessError
Intended for use by OperationRunner
implementations to allow them
to record the run order of this operation relative to all other
operations run, this is primarily useful when tracking multi-threaded
runs. Trying to set this once it has been set will lead to an
IllegalAccessError
order
- OrderIllegalAccessError
- Thrown if you try to set the run order after it has been setint getId()
This ID can be used to link the operation run back to an operation in the
originating operation mix, this can be useful when using
OperationMixRunner
implementations which may run the same
operation multiple times in a single mix run or may not necessarily run
all operations every time.
UNKNOWN
otherwisevoid setId(int id) throws IllegalAccessError
id
- IllegalAccessError
Copyright © 2015. All rights reserved.