|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sparql.benchmarking.stats.impl.AbstractOperationRun
public abstract class AbstractOperationRun
Abstract implementation of an operation run
| Field Summary |
|---|
| Fields inherited from interface net.sf.sparql.benchmarking.stats.OperationRun |
|---|
NOT_YET_RUN, UNKNOWN |
| Constructor Summary | |
|---|---|
protected |
AbstractOperationRun(long runtime,
long resultCount)
Creates an operation run which represents the results of running an operation |
protected |
AbstractOperationRun(long runtime,
long responseTime,
long resultCount)
Creates an operation run which represents the results of running an operation |
protected |
AbstractOperationRun(String error,
int errorCategory,
long runtime)
Creates a operation run which represents that the running of an operation resulted in an error |
| Method Summary | |
|---|---|
int |
compareTo(OperationRun other)
Compares a run to another |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractOperationRun(String error,
int errorCategory,
long runtime)
error - Error Messageruntime - Runtime, this is the amount of time elapsed until the
error/timeout was reached
protected AbstractOperationRun(long runtime,
long resultCount)
runtime - RuntimeresultCount - Result Count
protected AbstractOperationRun(long runtime,
long responseTime,
long resultCount)
runtime - RuntimeresponseTime - Response TimeresultCount - Result Count| Method Detail |
|---|
public long getRuntime()
OperationRun
getRuntime in interface OperationRunpublic long getResponseTime()
OperationRun
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
OperationRun.getRuntime() statistic.
getResponseTime in interface OperationRunpublic long getResultCount()
OperationRun
getResultCount in interface OperationRunpublic boolean wasSuccessful()
OperationRun
wasSuccessful in interface OperationRunpublic String getErrorMessage()
OperationRun
getErrorMessage in interface OperationRunpublic int getErrorCategory()
OperationRun
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.
getErrorCategory in interface OperationRunpublic long getRunOrder()
OperationRunThis 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.
getRunOrder in interface OperationRun
public void setRunOrder(long order)
throws IllegalAccessError
OperationRun
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
setRunOrder in interface OperationRunorder - Order
IllegalAccessError - Thrown if you try to set the run order after it has been setpublic int getId()
OperationRun
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.
getId in interface OperationRunOperationRun.UNKNOWN otherwise
public void setId(int id)
throws IllegalAccessError
OperationRun
setId in interface OperationRunIllegalAccessErrorpublic int compareTo(OperationRun other)
Used for sorting the runs so outliers can be trimmed
compareTo in interface Comparable<OperationRun>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||