statsparser

Handle the parsing and aggregation of simulation results

Classes:

StatsParser
main statistics parsing class
class simulations.statsparser.StatsParser(*args, **kwdargs)[source]

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
_check_base_options()[source]

Verify the values passed to the base options

Checks:

  • Stats file exists
_go(statsfile, out)[source]

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_base_options()[source]

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
go(**kwdargs)[source]

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)
Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.