Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStats ¶
EventStats defines an object that keeps a tally of each event that has occurred during a simulation.
func NewEventStats ¶
func NewEventStats() EventStats
NewEventStats creates a new empty EventStats object
func (EventStats) ExportEvents ¶
func (es EventStats) ExportEvents(ExportStatsPath string, w io.Writer)
func (EventStats) ExportJSON ¶
func (es EventStats) ExportJSON(path string)
ExportJSON saves the event stats as a JSON file on a given path
func (EventStats) Print ¶
func (es EventStats) Print(w io.Writer)
Print the event stats in JSON format.
func (EventStats) Tally ¶
func (es EventStats) Tally(route, op, evResult string)
Tally increases the count of a simulation event.
type ExportConfig ¶
type ExportConfig struct { ExportParamsPath string // custom file path to save the exported params JSON ExportParamsHeight int // height to which export the randomly generated params ExportStatePath string // custom file path to save the exported app state JSON ExportStatsPath string // custom file path to save the exported simulation statistics JSON WriteStatsToDB bool }
type StatsDb ¶
type StatsDb struct {
// contains filtered or unexported fields
}
TODO: Setup an sql schema file instead of doing it in-line here
func SetupStatsDb ¶
func SetupStatsDb(config ExportConfig) (StatsDb, error)
func (StatsDb) LogActionResult ¶
func (stats StatsDb) LogActionResult(header tmproto.Header, opMsg simulation.OperationMsg, resultData []byte) error
Click to show internal directories.
Click to hide internal directories.