Documentation ¶
Index ¶
- func RunWithConfigCustomStats[T any](ctx context.Context, cfg string, simcfg *info.ActionList, gcsl ast.Node, ...) (*model.SimulationResult, error)
- type CollectorCustomStats
- type CustomDamageAggBuffer
- type CustomDamageStatsBuffer
- type CustomEnergyAggBuffer
- type CustomEnergyStatsBuffer
- type JobCustomStats
- type NewStatsFuncCustomStats
- type PoolCustomStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithConfigCustomStats ¶
func RunWithConfigCustomStats[T any](ctx context.Context, cfg string, simcfg *info.ActionList, gcsl ast.Node, opts simulator.Options, seed int64, cstat NewStatsFuncCustomStats[T], cagg func(T)) (*model.SimulationResult, error)
Runs the simulation with a given parsed config and custom stat collector and aggregator TODO: cfg string should be in the action list instead TODO: need to add a context here to avoid infinite looping
Types ¶
type CollectorCustomStats ¶
func OptimizerDmgStat ¶
func OptimizerDmgStat(core *core.Core) (CollectorCustomStats[CustomDamageStatsBuffer], error)
func OptimizerERStat ¶
func OptimizerERStat(core *core.Core) (CollectorCustomStats[CustomEnergyStatsBuffer], error)
type CustomDamageAggBuffer ¶
func NewDamageAggBuffer ¶
func NewDamageAggBuffer(cfg *info.ActionList) CustomDamageAggBuffer
func (*CustomDamageAggBuffer) Add ¶
func (agg *CustomDamageAggBuffer) Add(b CustomDamageStatsBuffer)
func (*CustomDamageAggBuffer) Flush ¶
func (agg *CustomDamageAggBuffer) Flush()
type CustomDamageStatsBuffer ¶
type CustomDamageStatsBuffer struct { ExpectedDmgCumu []float64 // contains filtered or unexported fields }
func (CustomDamageStatsBuffer) Flush ¶
func (b CustomDamageStatsBuffer) Flush(core *core.Core) CustomDamageStatsBuffer
type CustomEnergyAggBuffer ¶
type CustomEnergyAggBuffer struct { WeightedER [][]float64 ErNeeded [][]float64 AdditionalErNeeded [][]float64 }
func NewEnergyAggBuffer ¶
func NewEnergyAggBuffer(cfg *info.ActionList) CustomEnergyAggBuffer
func (*CustomEnergyAggBuffer) Add ¶
func (agg *CustomEnergyAggBuffer) Add(b CustomEnergyStatsBuffer)
func (*CustomEnergyAggBuffer) Flush ¶
func (agg *CustomEnergyAggBuffer) Flush()
type CustomEnergyStatsBuffer ¶
func (CustomEnergyStatsBuffer) Flush ¶
func (b CustomEnergyStatsBuffer) Flush(core *core.Core) CustomEnergyStatsBuffer
type JobCustomStats ¶
type JobCustomStats[T any] struct { Cfg *info.ActionList Actions ast.Node Seed int64 Cstat NewStatsFuncCustomStats[T] }
type NewStatsFuncCustomStats ¶
type NewStatsFuncCustomStats[T any] func(core *core.Core) (CollectorCustomStats[T], error)
type PoolCustomStats ¶
type PoolCustomStats[T any] struct { QueueCh chan JobCustomStats[T] StopCh chan bool // contains filtered or unexported fields }
func WorkerNewWithCustomStats ¶
func WorkerNewWithCustomStats[T any](maxWorker int, respCh chan stats.Result, errCh chan error, customCh chan T) *PoolCustomStats[T]
New creates a new Pool. Jobs can be sent to new pool by sending to p.QueueCh Closing p.StopCh will cause the pool to stop executing any queued jobs and currently working workers will no longer send back responses
Click to show internal directories.
Click to hide internal directories.