results

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package results defines the shared run and scenario result types and a parallel scenario executor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScenarioRunResult

type ScenarioRunResult struct {
	Name                    string                           `json:"name"`
	Success                 bool                             `json:"isSuccess"`
	ErrorMessage            string                           `json:"errorMessage"`
	DurationSeconds         float64                          `json:"durationSeconds"`
	MatchingDurationSeconds float64                          `json:"matchingDurationSeconds"`
	TimeExecuted            time.Time                        `json:"timeExecuted"`
	ExecutorName            string                           `json:"executorName"`
	ExecutorType            string                           `json:"executorType"`
	ExecutionId             string                           `json:"executionId"`
	SimulationID            string                           `json:"simulationId,omitempty"`
	Assertions              []matchers.AlertGeneratedMatcher `json:"matchers,omitempty"`
	FailedAssertions        []matchers.AlertGeneratedMatcher `json:"-"`
	Indicators              *runner.Indicators               `json:"indicators,omitempty"`
	Metadata                *runner.Metadata                 `json:"metadata,omitempty"`
	CollectedLogPath        string                           `json:"collectedLogPath,omitempty"`
	CollectedDocCount       int                              `json:"collectedDocCount,omitempty"`
	DiscoveredAlerts        []runner.DiscoveredAlert         `json:"discoveredAlerts,omitempty"`
	ExploreMode             bool                             `json:"exploreMode,omitempty"`
}

func RunScenariosParallel

func RunScenariosParallel(
	scenarios []*runner.Scenario,
	parallelism int,
	callback func(result *ScenarioRunResult),
) []ScenarioRunResult

RunScenariosParallel runs scenarios in parallel with the given parallelism. The callback is invoked each time a scenario completes.

type SimrunRunResult

type SimrunRunResult struct {
	RunId            string              `json:"runId"`
	StartTime        time.Time           `json:"startTime"`
	EndTime          time.Time           `json:"endTime"`
	TotalScenarios   int                 `json:"totalScenarios"`
	SuccessScenarios int                 `json:"successScenarios"`
	FailedScenarios  int                 `json:"failedScenarios"`
	Scenarios        []ScenarioRunResult `json:"scenarios"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL