avrora.actions
Class BenchmarkAction

java.lang.Object
  extended byavrora.actions.Action
      extended byavrora.actions.SimAction
          extended byavrora.actions.BenchmarkAction

public class BenchmarkAction
extends SimAction

The BenchmarkAction class implements a stub of code that loads the program, runs it through the simulator several times to collect an average execution time, and reports the results. This is mostly used in evaluating the performance of the simulator.


Field Summary
static java.lang.String HELP
           
 Option.Long REPEAT
           
 
Fields inherited from class avrora.actions.SimAction
CHIP, ICOUNT, monitorFactoryList, monitorListMap, monitorMap, MONITORS, PLATFORM, REPORT_SECONDS, SECONDS, SECONDS_PRECISION, TIMEOUT, VISUAL
 
Fields inherited from class avrora.actions.Action
help, options, shortName
 
Constructor Summary
BenchmarkAction()
          The default constructor of the BenchmarkAction class simply creates an empty instance with the appropriate name and help string.
 
Method Summary
 void run(java.lang.String[] args)
          The run() method is called by the main class.
 
Methods inherited from class avrora.actions.SimAction
getLocationList, getMicrocontroller, getPlatform, hasMonitors, initializeSimulatorStatics, newSimulator, newSimulator, printSeparator, printSimHeader, processMonitorList, processTimeout, reportMonitors, reportQuantity, reportQuantity, reportQuantity
 
Methods inherited from class avrora.actions.Action
getHelp, getShortName, newOption, newOption, newOption, newOption, newOption, newOptionList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP

public static final java.lang.String HELP
See Also:
Constant Field Values

REPEAT

public final Option.Long REPEAT
Constructor Detail

BenchmarkAction

public BenchmarkAction()
The default constructor of the BenchmarkAction class simply creates an empty instance with the appropriate name and help string.

Method Detail

run

public void run(java.lang.String[] args)
         throws java.lang.Exception
The run() method is called by the main class. It loads the program, sets up the simulator according to the configuration, and begins running the simulator, reporting the average execution time.

Specified by:
run in class Action
Parameters:
args - the command line arguments after the options have been stripped out
Throws:
java.lang.Exception - if there is a problem loading the program, or an exception occurs during simulation