Handle the parsing and aggregation of simulation results
Classes:
- StatsParser
- main statistics parsing class
Bases: simulations.base.Base
Base class for parsing result files.
Keyword Parameters:
- option_error_handler
- An error handler for the OptionParser
- option_exit_handler
- An exit handler for the OptionParser
Public Methods:
- go()
- Kick off parsing the results
Methods to Implement:
- _add_listeners()
- Add listeners for various parsing events
Events:
- done(this, out)
- emitted when results are totally done
- go(this)
- emitted when the go() method is called
- oparser set up(this)
- emitted after the OptionParser is set up and able to add options
- options parsed(this)
- emitted after the OptionParser has parsed arguments
- result(this, out, duplication, result)
- emitted when a result is ready to be interpreted
- result options(this, out, options)
- emitted when the simulation runner options are ready to be interpreted
Verify the values passed to the base options
Checks:
- Stats file exists
Actually parses the data
Parameters:
- statsfile
- a file object for the file to parse
- out
- the output target (either a file object or sys.stdout)
Set up the basic OptionParser options
Options:
-F FILE, --statsfile=FILE | |
File name of the results file | |
-O FILE, --outfile=FILE | |
File to which to print data | |
-V, --verbose | Print detailed output to stdout as things are processed |
Pass off the parsing of the results file after some data manipulation
Keyword Parameters:
- option_args
- arguments to pass to the OptionParser. Defaults to sys.argv[1:].
- option_values
- target of option parsing (probably should not use)