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

java.lang.Object
  extended by net.sf.sparql.benchmarking.stats.impl.OperationMixStatsImpl
All Implemented Interfaces:
OperationMixStats

public class OperationMixStatsImpl
extends Object
implements OperationMixStats

Basic implementation of operation mix statistics

Author:
rvesse

Constructor Summary
OperationMixStatsImpl()
           
 
Method Summary
 void add(OperationMixRun run)
          Adds information for the given run to the statistics
 void clear()
          Clears all run statistics
 long getActualAverageRuntime()
          Gets the average actual runtime for the mix over all runs (takes into account parallelization of operations)
 double getActualOperationMixesPerHour()
          Calculates the number of operation mixes per hour that could be executed based on the OperationMixStats.getActualAverageRuntime()
 long getActualRuntime()
          Gets the actual runtime for the mix over all runs (takes into account queries that run in parallel)
 long getAverageResponseTime()
          Gets the average response time for the mix
 long getAverageRuntime()
          Gets the average runtime for the mix over all runs
 Map<Integer,List<OperationRun>> getCategorizedErrors()
          Gets the information for all errors grouped by category
 double getGeometricAverageRuntime()
          Gets the average runtime for the mix over all runs (geometric mean)
 long getMaximumRuntime()
          Gets the maximum runtime for a mix
 long getMinimumRuntime()
          Gets the minimum runtime for a mix
 double getOperationMixesPerHour()
          Calculates the number of operation mixes per hour that could be executed based on the average runtime of the operation mix
 long getRunCount()
          Gets the number of runs for which information has been recorded
 Iterator<OperationMixRun> getRuns()
          Gets an iterator over the operation mix runs
 double getStandardDeviation()
          Gets the standard deviation in mix runtime
 ParallelTimer getTimer()
          Gets the parallel timer used to track actual runtime
 long getTotalErrors()
          Gets the total number of errors over all runs
 long getTotalOperations()
          Gets the total number of operations run across all mix runs
 long getTotalResponseTime()
          Gets the total response time over all runs
 long getTotalRuntime()
          Gets the total runtime over all runs
 double getVariance()
          Gets the variance in mix runtime
 void trim(int outliers)
          Trims the worst and best N results
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationMixStatsImpl

public OperationMixStatsImpl()
Method Detail

getRuns

public Iterator<OperationMixRun> getRuns()
Description copied from interface: OperationMixStats
Gets an iterator over the operation mix runs

Specified by:
getRuns in interface OperationMixStats
Returns:
Mix Runs

getRunCount

public long getRunCount()
Description copied from interface: OperationMixStats
Gets the number of runs for which information has been recorded

Specified by:
getRunCount in interface OperationMixStats
Returns:
Number of runs

clear

public void clear()
Description copied from interface: OperationMixStats
Clears all run statistics

Specified by:
clear in interface OperationMixStats

trim

public void trim(int outliers)
Description copied from interface: OperationMixStats
Trims the worst and best N results

Specified by:
trim in interface OperationMixStats
Parameters:
outliers - Number of outliers to trim

getTotalOperations

public long getTotalOperations()
Description copied from interface: OperationMixStats
Gets the total number of operations run across all mix runs

Specified by:
getTotalOperations in interface OperationMixStats
Returns:
Total operations run

getTotalErrors

public long getTotalErrors()
Description copied from interface: OperationMixStats
Gets the total number of errors over all runs

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

getCategorizedErrors

public Map<Integer,List<OperationRun>> getCategorizedErrors()
Description copied from interface: OperationMixStats
Gets the information for all errors grouped by category

Specified by:
getCategorizedErrors in interface OperationMixStats
Returns:
Errors grouped by category

getTotalRuntime

public long getTotalRuntime()
Description copied from interface: OperationMixStats
Gets the total runtime over all runs

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

getActualRuntime

public long getActualRuntime()
Description copied from interface: OperationMixStats
Gets the actual runtime for the mix over all runs (takes into account queries that run in parallel)

Specified by:
getActualRuntime in interface OperationMixStats
Returns:
Actual Runtime in nanoseconds

getTotalResponseTime

public long getTotalResponseTime()
Description copied from interface: OperationMixStats
Gets the total response time over all runs

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

getAverageRuntime

public long getAverageRuntime()
Description copied from interface: OperationMixStats
Gets the average runtime for the mix over all runs

Specified by:
getAverageRuntime in interface OperationMixStats
Returns:
Arithmetic Average Runtime in nanoseconds

getActualAverageRuntime

public long getActualAverageRuntime()
Description copied from interface: OperationMixStats
Gets the average actual runtime for the mix over all runs (takes into account parallelization of operations)

Specified by:
getActualAverageRuntime in interface OperationMixStats
Returns:
Arithmetic Actual Average Runtime in nanoseconds

getAverageResponseTime

public long getAverageResponseTime()
Description copied from interface: OperationMixStats
Gets the average response time for the mix

Specified by:
getAverageResponseTime in interface OperationMixStats
Returns:
Arithmetic Average Response in nanoseconds

getGeometricAverageRuntime

public double getGeometricAverageRuntime()
Description copied from interface: OperationMixStats
Gets the average runtime for the mix over all runs (geometric mean)

Specified by:
getGeometricAverageRuntime in interface OperationMixStats
Returns:
Geometric Average Runtime in nanoseconds

getMinimumRuntime

public long getMinimumRuntime()
Description copied from interface: OperationMixStats
Gets the minimum runtime for a mix

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

getMaximumRuntime

public long getMaximumRuntime()
Description copied from interface: OperationMixStats
Gets the maximum runtime for a mix

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

getVariance

public double getVariance()
Description copied from interface: OperationMixStats
Gets the variance in mix runtime

Specified by:
getVariance in interface OperationMixStats
Returns:
Runtime Variance in nanoseconds

getStandardDeviation

public double getStandardDeviation()
Description copied from interface: OperationMixStats
Gets the standard deviation in mix runtime

Specified by:
getStandardDeviation in interface OperationMixStats
Returns:
Runtime Standard Deviation in nanoseconds

getOperationMixesPerHour

public double getOperationMixesPerHour()
Description copied from interface: OperationMixStats
Calculates the number of operation mixes per hour that could be executed based on the average runtime of the operation mix

Specified by:
getOperationMixesPerHour in interface OperationMixStats
Returns:
Operation Mixes per Hour

getActualOperationMixesPerHour

public double getActualOperationMixesPerHour()
Description copied from interface: OperationMixStats
Calculates the number of operation mixes per hour that could be executed based on the OperationMixStats.getActualAverageRuntime()

Specified by:
getActualOperationMixesPerHour in interface OperationMixStats
Returns:
Operation Mixes per Hour

getTimer

public ParallelTimer getTimer()
Description copied from interface: OperationMixStats
Gets the parallel timer used to track actual runtime

Specified by:
getTimer in interface OperationMixStats
Returns:
Parallel timer

add

public void add(OperationMixRun run)
Description copied from interface: OperationMixStats
Adds information for the given run to the statistics

Specified by:
add in interface OperationMixStats
Parameters:
run - Run information


Copyright © 2014. All Rights Reserved.