be.ac.ua.broker.evaluation
Class Benchmark

java.lang.Object
  extended by be.ac.ua.broker.evaluation.Benchmark

public class Benchmark
extends java.lang.Object

Class represents the run of a benchmark which consists of different runs of the broker application in which the four phases of the brokering process are timed and the resulting costs overview is saved to file. This benchmark is build on top of the broker to evaluate its performance in terms of cost and time.

Author:
Vermeersch Kurt

Constructor Summary
Benchmark(boolean wlm1)
          Constructor for Benchmark
 
Method Summary
static void main(java.lang.String[] args)
          Run the benchmark using the parameters specified in the BenchmarkOptions.
 void run(java.lang.String reg, java.lang.String outputResults, java.lang.String outputTasks)
          Run the benchmarking of the broker for the given geographical region.
 void runBroker(java.lang.String inputDir, java.lang.String schedulingType, java.lang.String allocationType, int numberOfTasks)
          A single run of the broker, during this run the cost and timing metrics are monitored.
 void writeResultsToFile(java.lang.String schedulingType, java.lang.String allocationType, int numberOfTasks)
          Write the cost and timing results of a single run of the broker to file.
 void writeTasksToFile()
          Write the task information of the workload used during a single run of the broker to file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Benchmark

public Benchmark(boolean wlm1)
Constructor for Benchmark

Parameters:
wlm1 - whether the first workload model is used for the tasks making up the workload for which the broker will be used during the benchmarking
Method Detail

main

public static void main(java.lang.String[] args)
Run the benchmark using the parameters specified in the BenchmarkOptions.

Parameters:
args - the program arguments

run

public void run(java.lang.String reg,
                java.lang.String outputResults,
                java.lang.String outputTasks)
Run the benchmarking of the broker for the given geographical region. The benchmark loops over all possible instance types and operating systems, and all the possible scheduling and allocation options. For every combination the broker is run for a number of workload, according to the benchmarking version used.

Parameters:
reg - the geographical region to use while benchmarking the broker
outputResults - file to store the benchmarking results (cost and timing) in.
outputTasks - file to store the specification of the workload used during the benchmarking in

runBroker

public void runBroker(java.lang.String inputDir,
                      java.lang.String schedulingType,
                      java.lang.String allocationType,
                      int numberOfTasks)
               throws InstanceNotAvailableException
A single run of the broker, during this run the cost and timing metrics are monitored. Every brokering phase (input, scheduling, allocation, output) is timed and the cost results are written to file as well.

Parameters:
inputDir - location where the task specification files of the workload that has to be presented to the broker can be found.
schedulingType - the scheduling option the broker has to use
allocationType - the allocation scheme option the broker has to use
numberOfTasks - the number of tasks in the workload presented to the broker
Throws:
InstanceNotAvailableException - exception thrown when one of the input options is not supported by the broker according to the input verifier

writeResultsToFile

public void writeResultsToFile(java.lang.String schedulingType,
                               java.lang.String allocationType,
                               int numberOfTasks)
Write the cost and timing results of a single run of the broker to file.

Parameters:
schedulingType - the scheduling option the broker has used
allocationType - the allocation scheme option the broker has used
numberOfTasks - the number of tasks of the workload presented to the broker

writeTasksToFile

public void writeTasksToFile()
Write the task information of the workload used during a single run of the broker to file.