Documentation ¶
Index ¶
- func CryptoRandSeed() int64
- func GenerateCharacterDetails(cfg *info.ActionList) ([]*model.Character, error)
- func GenerateResult(cfg string, simcfg *info.ActionList) (*model.SimulationResult, error)
- func GenerateSampleWithSeed(cfg string, seed uint64, opts Options) (*model.Sample, error)
- func Parse(cfg string) (*info.ActionList, ast.Node, error)
- func ReadConfig(fpath string) (string, error)
- func Run(ctx context.Context, opts Options) (*model.SimulationResult, error)
- func RunWithConfig(ctx context.Context, cfg string, simcfg *info.ActionList, gcsl ast.Node, ...) (*model.SimulationResult, error)
- func Version() string
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptoRandSeed ¶
func CryptoRandSeed() int64
cryptoRandSeed generates a random seed using crypo rand
func GenerateCharacterDetails ¶
func GenerateCharacterDetails(cfg *info.ActionList) ([]*model.Character, error)
func GenerateResult ¶
func GenerateResult(cfg string, simcfg *info.ActionList) (*model.SimulationResult, error)
Note: this generation should be iteration independent (iterations do not change output)
func GenerateSampleWithSeed ¶
GenerateSampleWithSeed will run one simulation with debug enabled using the given seed and output the debug log. Used for generating debug for min/max runs
func ReadConfig ¶
readConfig will load and read the config at specified path. Will resolve any import statements as well
func RunWithConfig ¶
func RunWithConfig(ctx context.Context, cfg string, simcfg *info.ActionList, gcsl ast.Node, opts Options, start time.Time) (*model.SimulationResult, error)
Runs the simulation with a given parsed config TODO: cfg string should be in the action list instead TODO: need to add a context here to avoid infinite looping
Types ¶
type Options ¶
type Options struct { ResultSaveToPath string // file name (excluding ext) to save the result file; if "" then nothing is saved to file GZIPResult bool // should the result file be gzipped; only if ResultSaveToPath is not "" ConfigPath string // path to the config file to read }
Options sets out the settings to run the sim by (such as debug mode, etc..)
Click to show internal directories.
Click to hide internal directories.