net.sf.sparql.benchmarking.stats.impl
Class OperationMixRunImpl

java.lang.Object
  extended by net.sf.sparql.benchmarking.stats.impl.OperationMixRunImpl
All Implemented Interfaces:
Comparable<OperationMixRun>, OperationMixRun

public class OperationMixRunImpl
extends Object
implements OperationMixRun

Implementation of an operation mix run

Author:
rvesse

Field Summary
protected  long order
           
protected  List<OperationRun> runs
           
 
Constructor Summary
OperationMixRunImpl(Collection<OperationRun> runs, long runOrder)
          Creates a new operation mix run which represents the results of running a mix of operations
 
Method Summary
 int compareTo(OperationMixRun other)
          Compares one run to another
 long getMaximumRuntime()
          Gets the runtime of the operation from the set that took the longest time to run
 int getMaximumRuntimeOperationID()
          Gets the ID of the operation that took the longest time to run
 long getMinimumRuntime()
          Gets the runtime of the operation from the set that took the shortest time to run
 int getMinimumRuntimeOperationID()
          Gets the ID of the operation that took the shortest time to run
 long getRunCount()
          Gets the number of operations runs that comprised this mix run
 long getRunOrder()
          Gets the global run order that reflects the order in which the operation mixes and operations were run
 Iterator<OperationRun> getRuns()
          Gets an iterator over the runs that make up this operation mix
 List<OperationRun> getRuns(int id)
          Gets the list of run information for the given operation ID, if there are no runs for that given operation within this mix run then an empty list is returned.
 long getTotalErrors()
          Gets the total number of errors for the operation mix
 long getTotalResponseTime()
          Gets the total response time for the Operation Mix
 long getTotalResults()
          Gets the total number of results for the operation mix
 long getTotalRuntime()
          Gets the total runtime for the Operation Mix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runs

protected List<OperationRun> runs

order

protected long order
Constructor Detail

OperationMixRunImpl

public OperationMixRunImpl(Collection<OperationRun> runs,
                           long runOrder)
Creates a new operation mix run which represents the results of running a mix of operations

Parameters:
runs - Operation runs which make up this mix run
runOrder - Global Run Order
Method Detail

getRuns

public Iterator<OperationRun> getRuns()
Description copied from interface: OperationMixRun
Gets an iterator over the runs that make up this operation mix

Implementations need not make any guarantee that the runs are returned in any specific order, users should not rely on the order of runs in order to look up their associated operations. The recommended way to do this is to use the OperationRun.getId() to obtain the ID of the associated operation and then call OperationMix.getOperation(int) to look up the actual operation.

Specified by:
getRuns in interface OperationMixRun
Returns:
Iterator over the runs

getRuns

public List<OperationRun> getRuns(int id)
Description copied from interface: OperationMixRun
Gets the list of run information for the given operation ID, if there are no runs for that given operation within this mix run then an empty list is returned.

Specified by:
getRuns in interface OperationMixRun
Parameters:
id - Operation ID
Returns:
List of operation runs (possibly empty)

getRunCount

public long getRunCount()
Description copied from interface: OperationMixRun
Gets the number of operations runs that comprised this mix run

Specified by:
getRunCount in interface OperationMixRun
Returns:
Number of operations run

getRunOrder

public long getRunOrder()
Description copied from interface: OperationMixRun
Gets the global run order that reflects the order in which the operation mixes and operations were run

Specified by:
getRunOrder in interface OperationMixRun
Returns:
Global Order

getTotalErrors

public long getTotalErrors()
Description copied from interface: OperationMixRun
Gets the total number of errors for the operation mix

Specified by:
getTotalErrors in interface OperationMixRun
Returns:
Total number of errors

getTotalResults

public long getTotalResults()
Description copied from interface: OperationMixRun
Gets the total number of results for the operation mix

Specified by:
getTotalResults in interface OperationMixRun
Returns:
Total number of results

getTotalRuntime

public long getTotalRuntime()
Description copied from interface: OperationMixRun
Gets the total runtime for the Operation Mix

Specified by:
getTotalRuntime in interface OperationMixRun
Returns:
Total Runtime in nanoseconds

getTotalResponseTime

public long getTotalResponseTime()
Description copied from interface: OperationMixRun
Gets the total response time for the Operation Mix

Specified by:
getTotalResponseTime in interface OperationMixRun
Returns:
Total Response Time in nanoseconds

getMinimumRuntime

public long getMinimumRuntime()
Description copied from interface: OperationMixRun
Gets the runtime of the operation from the set that took the shortest time to run

Specified by:
getMinimumRuntime in interface OperationMixRun
Returns:
Minimum Runtime in nanoseconds

getMinimumRuntimeOperationID

public int getMinimumRuntimeOperationID()
Description copied from interface: OperationMixRun
Gets the ID of the operation that took the shortest time to run

Specified by:
getMinimumRuntimeOperationID in interface OperationMixRun
Returns:
ID of the Operation with the Minimum Runtime

getMaximumRuntime

public long getMaximumRuntime()
Description copied from interface: OperationMixRun
Gets the runtime of the operation from the set that took the longest time to run

Specified by:
getMaximumRuntime in interface OperationMixRun
Returns:
Maximum Runtime in nanoseconds

getMaximumRuntimeOperationID

public int getMaximumRuntimeOperationID()
Description copied from interface: OperationMixRun
Gets the ID of the operation that took the longest time to run

Specified by:
getMaximumRuntimeOperationID in interface OperationMixRun
Returns:
ID of the operation with Maximum Runtime

compareTo

public int compareTo(OperationMixRun other)
Compares one run to another

Used for sorting the runs so that outliers can be trimmed

Specified by:
compareTo in interface Comparable<OperationMixRun>


Copyright © 2014. All Rights Reserved.