common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableArchitectures = []SystemArchitecture{
	{
		ID:   "default",
		Name: "RAFT-Atomizer based",
		Roles: []SystemArchitectureRole{
			{
				Role:       SystemRoleArchiver,
				Title:      "Archiver",
				ShortTitle: "Arch",
			},
			{
				Role:       SystemRoleRaftAtomizer,
				Title:      "Atomizer",
				ShortTitle: "Atmzr",
			},
			{
				Role:       SystemRoleShard,
				Title:      "Shard",
				ShortTitle: "Shard",
			},
			{
				Role:       SystemRoleSentinel,
				Title:      "Sentinel",
				ShortTitle: "Sent",
			},
			{
				Role:       SystemRoleAtomizerCliWatchtower,
				Title:      "Watchtower CLI",
				ShortTitle: "WT-CLI",
			},
			{
				Role:       SystemRoleWatchtower,
				Title:      "Watchtower",
				ShortTitle: "WTow",
			},
		},
		DefaultTest: &TestRun{
			Roles: []*TestRunRole{
				{Role: SystemRoleArchiver, Index: 0, AgentID: -1},
				{Role: SystemRoleRaftAtomizer, Index: 0, AgentID: -1},
				{Role: SystemRoleShard, Index: 0, AgentID: -1},
				{Role: SystemRoleShard, Index: 1, AgentID: -1},
				{Role: SystemRoleSentinel, Index: 0, AgentID: -1},
				{Role: SystemRoleWatchtower, Index: 0, AgentID: -1},
				{Role: SystemRoleAtomizerCliWatchtower, Index: 0, AgentID: -1},
			},
			SweepRoles:               make([]*TestRunRole, 0),
			STXOCacheDepth:           10,
			BatchSize:                100000,
			WindowSize:               100000,
			TargetBlockInterval:      250,
			ElectionTimeoutUpper:     4000,
			ElectionTimeoutLower:     3000,
			Heartbeat:                1000,
			RaftMaxBatch:             100000,
			SnapshotDistance:         0,
			ShardReplicationFactor:   2,
			Architecture:             "default",
			SampleCount:              1215,
			LoadGenOutputCount:       2,
			LoadGenInputCount:        2,
			FixedTxRate:              1,
			PreseedCount:             1000000,
			PreseedShards:            true,
			TrimSamplesAtStart:       5,
			TrimZeroesAtStart:        true,
			TrimZeroesAtEnd:          true,
			CoordinatorLogLevel:      "WARN",
			AtomizerLogLevel:         "WARN",
			SentinelLogLevel:         "WARN",
			ArchiverLogLevel:         "WARN",
			WatchtowerLogLevel:       "WARN",
			ShardLogLevel:            "WARN",
			Debug:                    false,
			RunPerf:                  false,
			BatchDelay:               0,
			InvalidTxRate:            0,
			SkipCleanUp:              false,
			KeepTimedOutAgents:       false,
			Repeat:                   1,
			RetryOnFailure:           false,
			WatchtowerBlockCacheSize: 100,
			WatchtowerErrorCacheSize: 10000000,
			MaxRetries:               1,
		},
	},
	{
		ID:   "2pc",
		Name: "Two-phase Commit",
		Roles: []SystemArchitectureRole{
			{
				Role:       SystemRoleCoordinator,
				Title:      "Coordinator",
				ShortTitle: "Coord",
			},
			{
				Role:       SystemRoleShardTwoPhase,
				Title:      "Shard",
				ShortTitle: "Shard",
			},
			{
				Role:       SystemRoleSentinelTwoPhase,
				Title:      "Sentinel",
				ShortTitle: "Sent",
			},
			{
				Role:       SystemRoleTwoPhaseGen,
				Title:      "Generator",
				ShortTitle: "Gen",
			},
		},
		DefaultTest: &TestRun{
			Roles: []*TestRunRole{
				{Role: SystemRoleCoordinator, Index: 0, AgentID: -1},
				{Role: SystemRoleCoordinator, Index: 1, AgentID: -1},
				{Role: SystemRoleCoordinator, Index: 2, AgentID: -1},
				{Role: SystemRoleShardTwoPhase, Index: 0, AgentID: -1},
				{Role: SystemRoleShardTwoPhase, Index: 1, AgentID: -1},
				{Role: SystemRoleShardTwoPhase, Index: 2, AgentID: -1},
				{Role: SystemRoleSentinelTwoPhase, Index: 0, AgentID: -1},
				{Role: SystemRoleTwoPhaseGen, Index: 0, AgentID: -1},
			},
			SweepRoles:               make([]*TestRunRole, 0),
			STXOCacheDepth:           0,
			BatchSize:                100000,
			WindowSize:               100000,
			TargetBlockInterval:      250,
			ElectionTimeoutUpper:     1000,
			ElectionTimeoutLower:     500,
			Heartbeat:                250,
			RaftMaxBatch:             100000,
			SnapshotDistance:         0,
			ShardReplicationFactor:   3,
			Architecture:             "2pc",
			SampleCount:              315,
			LoadGenOutputCount:       2,
			LoadGenInputCount:        2,
			FixedTxRate:              1,
			PreseedCount:             1000000,
			PreseedShards:            true,
			TrimSamplesAtStart:       5,
			TrimZeroesAtStart:        true,
			TrimZeroesAtEnd:          true,
			CoordinatorLogLevel:      "WARN",
			AtomizerLogLevel:         "WARN",
			SentinelLogLevel:         "WARN",
			ArchiverLogLevel:         "WARN",
			WatchtowerLogLevel:       "WARN",
			ShardLogLevel:            "WARN",
			Debug:                    false,
			RunPerf:                  false,
			BatchDelay:               1,
			InvalidTxRate:            0,
			SkipCleanUp:              false,
			KeepTimedOutAgents:       false,
			Repeat:                   1,
			RetryOnFailure:           false,
			WatchtowerBlockCacheSize: 100,
			WatchtowerErrorCacheSize: 10000000,
			MaxRetries:               1,
		},
	},
}
View Source
var ErrAgentResponseTimeout = errors.New(
	"agent did not respond within timeout limit",
)
View Source
var ErrCommandIDNotFound = errors.New("command ID not found")
View Source
var ErrRunNotFound = errors.New("run not found")
View Source
var ErrWrongMessageType = errors.New("received wrong message type")

Functions

func ConfigureCommitForDefaultTests

func ConfigureCommitForDefaultTests(hash string)

func ConfigureLaunchTemplatesForDefaultTests

func ConfigureLaunchTemplatesForDefaultTests(
	templateIDSmall, templateIDLarge string,
)

Sets the appropriate template IDs for the default test based on two types the small machine (2vcpu) and the big machine (8vcpu)

func CreateArchive

func CreateArchive(sourceFolder, targetPath string) error

CreateArchive creates a TAR.GZ archive of sourceFolder and writes it to the target path

func CreateArchiveToStream

func CreateArchiveToStream(sourceFolder string, target io.Writer) error

CreateArchiveToStream creates a TAR.GZ archive of sourceFolder and writes it to the target stream

func DataDir

func DataDir() string

DataDir returns the base directory where the process can store its data. This has been defaulted to the "data" subdirectory to the folder where the main process's executable is located. The directory will be created if it does not exist

func RandomID

func RandomID(len int) (string, error)

RandomID generates a random hexadecimal string of the requested len

func RandomIDBytes

func RandomIDBytes(len int) ([]byte, error)

RandomIDBytes generates a random byte array requested len

func ReadErrChan

func ReadErrChan(c chan error) error

ReadErrChan reads a channel of errors until it's closed and wraps it in a single error (or nil if no errors were sent to the channel)

func S3customResolver

func S3customResolver() aws.EndpointResolver

S3customResolver returns a function which can provide an S3 VPC interface endpoint value for the AWS SDK config provided the S3_INTERFACE_ENDPOINT and S3_INTERFACE_REGION environment variables are set. If they are not set, the configuration should default to the public S3 endpoint.

func TarExtract

func TarExtract(path string) error

TarExtract extracts a tar(.gz) archive with full folder hierarchy into a directory with the name of the archive (minus the extension)

func TarExtractFlat

func TarExtractFlat(path string, flat bool, createNoDir bool) error

TarExtractFlat extracts a tar(.gz) archive with optionally (parameter flat) flattened directory structure, and optionally (parameter createNoDir) extracting alongside the archive in stead of making a folder

func WaitTimeout

func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool

WaitTimeout waits for a WaitGroups completion, but with a timeout

Types

type AgentSystemInfo

type AgentSystemInfo struct {
	HostName           string   `json:"hostname"`
	PublicIP           net.IP   `json:"publicIP"`
	PrivateIPs         []net.IP `json:"privateIPs"`
	AvailableDiskSpace int64    `json:"diskAvailable"`
	TotalMemory        int64    `json:"memTotal"`
	AvailableMemory    int64    `json:"memAvailable"`
	OperatingSystem    string   `json:"os"`
	Architecture       string   `json:"arch"`
	NumCPU             int      `json:"numCPU"`
	AWS                bool     `json:"aws"`
	EC2InstanceID      string   `json:"ec2InstanceId"`
}

func (AgentSystemInfo) ToString

func (a AgentSystemInfo) ToString() string

type BlockLatencyResult

type BlockLatencyResult struct {
	Average float64 `json:"avg"`
	Min     float64 `json:"min"`
	Max     float64 `json:"max"`
	StdDev  float64 `json:"std"`
}

type ExecutedCommand

type ExecutedCommand struct {
	AgentID       int32     `json:"agentID"`
	CommandID     string    `json:"commandID"`
	ExitCode      int       `json:"returnCode"`
	Description   string    `json:"description"`
	InternalError string    `json:"internalError"`
	Params        []string  `json:"params"`
	Environment   []string  `json:"env"`
	Completed     time.Time `json:"completed"`
	Stdout        string    `json:"-"` // don't serialize this by default - fetch through separate API
	Stderr        string    `json:"-"` // don't serialize this by default - fetch through separate API
}

type File

type File struct {
	FilePath string
	Contents []byte
}

type MatrixResult

type MatrixResult struct {
	Config           *TestRunNormalizedConfig `json:"config"`
	Results          []*TestResult            `json:"-"`
	ResultCount      int                      `json:"resultCount"`
	ResultAvg        *TestResult              `json:"result"`
	ResultDetails    []*TestResult            `json:"resultDetails"`
	MinCompletedDate time.Time                `json:"minCompletedDate"`
	MaxCompletedDate time.Time                `json:"maxCompletedDate"`
}

type PacketMetadata

type PacketMetadata struct {
	Length     uint16
	SourceIP   [4]byte
	TargetIP   [4]byte
	SourcePort uint16
	TargetPort uint16
	Timestamp  uint16
}

func ReadPacketMetadata

func ReadPacketMetadata(r io.Reader) (*PacketMetadata, error)

func (*PacketMetadata) String

func (p *PacketMetadata) String() string

func (*PacketMetadata) WriteTo

func (p *PacketMetadata) WriteTo(w io.Writer) error

type S3Download

type S3Download struct {
	SourceRegion string
	SourceBucket string
	SourcePath   string
	TargetPath   string
	Retries      int
}

type S3Upload

type S3Upload struct {
	TargetRegion string
	TargetBucket string
	TargetPath   string
	SourcePath   string
	Retries      int
}

type SystemArchitecture

type SystemArchitecture struct {
	ID          string                   `json:"id"`
	Name        string                   `json:"name"`
	Roles       []SystemArchitectureRole `json:"roles"`
	DefaultTest *TestRun                 `json:"defaultTest"`
}

type SystemArchitectureRole

type SystemArchitectureRole struct {
	Role       SystemRole `json:"role"`
	Title      string     `json:"title"`
	ShortTitle string     `json:"shortTitle"`
}

type SystemRole

type SystemRole string

This file contains the definitions of the system architectures the test controller supports, and the roles that exist within those architectures the information in AvailableArchitecures is sent to the frontend to inform it of the available architectures and roles to pick from when composing a new test run

const SystemRoleArchiver SystemRole = "archiver"
const SystemRoleAtomizerCliWatchtower SystemRole = "atomizer-cli-watchtower"
const SystemRoleCoordinator SystemRole = "coordinator"
const SystemRoleRaftAtomizer SystemRole = "atomizer"
const SystemRoleSentinel SystemRole = "sentinel"
const SystemRoleSentinelTwoPhase SystemRole = "sentinel-2pc"
const SystemRoleShard SystemRole = "shard"
const SystemRoleShardTwoPhase SystemRole = "shard-2pc"
const SystemRoleTwoPhaseGen SystemRole = "twophase-gen"
const SystemRoleWatchtower SystemRole = "watchtower"

type TestResult

type TestResult struct {
	ThroughputAvg         float64                       `json:"throughputAvg"`
	ThroughputStd         float64                       `json:"throughputStd"`
	ThroughputMin         float64                       `json:"throughputMin"`
	ThroughputMax         float64                       `json:"throughputMax"`
	ThroughputPercentiles []TestResultPercentile        `json:"throughputPercentiles"`
	ThroughputAvg2        float64                       `json:"throughputAvg2"`
	ThroughputAvgs        map[string]float64            `json:"throughputAvgs"`
	BlockLatencies        map[string]BlockLatencyResult `json:"blockLatencies"`

	LatencyAvg         float64                `json:"latencyAvg"`
	LatencyStd         float64                `json:"latencyStd"`
	LatencyMin         float64                `json:"latencyMin"`
	LatencyMax         float64                `json:"latencyMax"`
	LatencyPercentiles []TestResultPercentile `json:"latencyPercentiles"`
}

type TestResultPercentile

type TestResultPercentile struct {
	Bucket float64 `json:"bucket"`
	Value  float64 `json:"value"`
}

type TestRun

type TestRun struct {
	ID                       string             `json:"id"`
	CreatedByThumbprint      string             `json:"createdByuserThumbprint"`
	Created                  time.Time          `json:"created"`
	Started                  time.Time          `json:"started"`
	Completed                time.Time          `json:"completed"`
	Status                   TestRunStatus      `json:"status"`
	CommitHash               string             `json:"commitHash"               feFieldTitle:"Code commit"                 feFieldType:"commit"`
	Architecture             string             `json:"architectureID"           feFieldTitle:"Architecture"                feFieldType:"arch"`
	BatchSize                int                `json:"batchSize"                feFieldTitle:"Batch size"                  feFieldType:"int"`
	SampleCount              int                `json:"sampleCount"              feFieldTitle:"Sample count"                feFieldType:"int"`
	ShardReplicationFactor   int                `json:"shardReplicationFactor"   feFieldTitle:"Shard Replication Factor"    feFieldType:"int"`
	STXOCacheDepth           int                `json:"stxoCacheDepth"           feFieldTitle:"STXO Cache Depth"            feFieldType:"int"`
	WindowSize               int                `json:"windowSize"               feFieldTitle:"Window size"                 feFieldType:"int"`
	TargetBlockInterval      int                `json:"targetBlockInterval"      feFieldTitle:"Target Block Interval"       feFieldType:"int"`
	ElectionTimeoutUpper     int                `json:"electionTimeoutUpper"     feFieldTitle:"Election timeout upper"      feFieldType:"int"`
	ElectionTimeoutLower     int                `json:"electionTimeoutLower"     feFieldTitle:"Election timeout lower"      feFieldType:"int"`
	Heartbeat                int                `json:"heartbeat"                feFieldTitle:"Heartbeat"                   feFieldType:"int"`
	RaftMaxBatch             int                `json:"raftMaxBatch"             feFieldTitle:"RAFT Max Batch"              feFieldType:"int"`
	SnapshotDistance         int                `json:"snapshotDistance"         feFieldTitle:"Snapshot Distance"           feFieldType:"int"`
	LoadGenOutputCount       int                `json:"loadGenOutputCount"       feFieldTitle:"Loadgen Output Count"        feFieldType:"int"`
	LoadGenInputCount        int                `json:"loadGenInputCount"        feFieldTitle:"Loadgen Input Count"         feFieldType:"int"`
	LoadGenThreads           int                `json:"loadGenThreads"           feFieldTitle:"Loadgen Threads"             feFieldType:"int"`
	BatchDelay               int                `json:"batchDelay"               feFieldTitle:"Batch Delay"                 feFieldType:"int"`
	RunPerf                  bool               `json:"runPerf"                  feFieldTitle:"Run Perf"                    feFieldType:"bool"`
	PerfSampleRate           int                `json:"perfSampleRate"           feFieldTitle:"Perf sample rate"            feFieldType:"int"`
	TrimSamplesAtStart       int                `json:"trimSamplesAtStart"       feFieldTitle:"Trim samples at start"       feFieldType:"int"`
	TrimZeroesAtStart        bool               `json:"trimZeroesAtStart"        feFieldTitle:"Trim zeroes at start"        feFieldType:"bool"`
	TrimZeroesAtEnd          bool               `json:"trimZeroesAtEnd"          feFieldTitle:"Trim zeroes at end"          feFieldType:"bool"`
	AtomizerLogLevel         string             `json:"atomizerLogLevel"         feFieldTitle:"Atomizer Log Level"          feFieldType:"loglevel"`
	ArchiverLogLevel         string             `json:"archiverLogLevel"         feFieldTitle:"Archiver Log Level"          feFieldType:"loglevel"`
	SentinelLogLevel         string             `json:"sentinelLogLevel"         feFieldTitle:"Sentinel Log Level"          feFieldType:"loglevel"`
	ShardLogLevel            string             `json:"shardLogLevel"            feFieldTitle:"Shard Log Level"             feFieldType:"loglevel"`
	CoordinatorLogLevel      string             `json:"coordinatorLogLevel"      feFieldTitle:"Coordinator Log Level"       feFieldType:"loglevel"`
	WatchtowerLogLevel       string             `json:"watchtowerLogLevel"       feFieldTitle:"Watchtower Log Level"        feFieldType:"loglevel"`
	WatchtowerBlockCacheSize int                `json:"watchtowerBlockCacheSize" feFieldTitle:"Watchtower Block Cache Size" feFieldType:"int"`
	WatchtowerErrorCacheSize int                `json:"watchtowerErrorCacheSize" feFieldTitle:"Watchtower Error Cache Size" feFieldType:"int"`
	InvalidTxRate            float64            `json:"invalidTxRate"            feFieldTitle:"Invalid TX Rate"             feFieldType:"float"`
	FixedTxRate              float64            `json:"fixedTxRate"              feFieldTitle:"Fixed TX Rate"               feFieldType:"float"`
	PreseedCount             int64              `json:"preseedCount"             feFieldTitle:"Number of preseeded outputs" feFieldType:"int"`
	PreseedShards            bool               `json:"preseedShards"            feFieldTitle:"Preseed outputs on shards"   feFieldType:"bool"`
	KeepTimedOutAgents       bool               `json:"keepTimedOutAgents"       feFieldTitle:"Keep timed out agents"       feFieldType:"bool"`
	SkipCleanUp              bool               `json:"skipCleanup"              feFieldTitle:"Skip cleanup after test"     feFieldType:"bool"`
	RetryOnFailure           bool               `json:"retryOnFailure"           feFieldTitle:"Retry on failures"           feFieldType:"bool"`
	MaxRetries               int                `json:"maxRetries"               feFieldTitle:"Maximum number of retries"   feFieldType:"int"`
	Repeat                   int                `json:"repeat"                   feFieldTitle:"Repeat test X times"         feFieldType:"int"`
	Debug                    bool               `json:"debug"                    feFieldTitle:"Run in debugger"             feFieldType:"bool"`
	RecordNetworkTraffic     bool               `json:"recordNetworkTraffic"     feFieldTitle:"Record network traffic"      feFieldType:"bool"`
	DontRunBefore            time.Time          `json:"notBefore"`
	Sweep                    string             `json:"sweep"`
	SweepID                  string             `json:"sweepID"`
	SweepRoleRuns            int                `json:"sweepRoleRuns"`
	SweepTimeMinutes         int                `json:"sweepTimeMinutes"`
	SweepTimeRuns            int                `json:"sweepTimeRuns"`
	SweepParameter           string             `json:"sweepParameterParam"`
	SweepParameterStart      float64            `json:"sweepParameterStart"`
	SweepParameterStop       float64            `json:"sweepParameterStop"`
	SweepParameterIncrement  float64            `json:"sweepParameterIncrement"`
	SweepOneAtATime          bool               `json:"sweepOneAtATime"`
	SweepRoles               []*TestRunRole     `json:"sweepRoles"`
	Priority                 int                `json:"priority"`
	Roles                    []*TestRunRole     `json:"roles"`
	Details                  string             `json:"details"`
	ExecutedCommands         []*ExecutedCommand `json:"executedCommands"`
	AgentDataAtStart         []TestRunAgentData `json:"testrunAgentData"`
	AgentDataAtEnd           []TestRunAgentData `json:"testrunAgentDataEnd"`
	PerformanceDataAvailable bool               `json:"performanceDataAvailable"`
	ControllerCommit         string             `json:"controllerCommitHash"`
	Result                   *TestResult        `json:"result"`
	SeederHash               string             `json:"seederHash"`
	TerminateChan            chan bool          `json:"-"`
	RetrySpawnChan           chan bool          `json:"-"`
	PendingResultDownloads   []S3Download       `json:"-"`

	DeliberateFailures []string `json:"-"`
	LogBuffer          string   `json:"-"`

	Params              []string `json:"-"`
	AWSInstancesStopped bool
	// contains filtered or unexported fields
}

TestRun describes the main type for administering and scheduling tests. The frontend posts a struct like this to the server to schedule a new job. Use the feFieldName and feFieldType decorators on the type (custom) to show the field in the frontend (both in the Schedule New Test Run screen and in the detail screen of the test runs)

func ExpandSweepRun

func ExpandSweepRun(originalTr *TestRun, sweepID string) []*TestRun

func FindMissingSweepRuns

func FindMissingSweepRuns(trs []*TestRun, sweepID string) []*TestRun

func (*TestRun) AddExecutedCommand

func (tr *TestRun) AddExecutedCommand(cmd *ExecutedCommand)

func (*TestRun) FullLog

func (tr *TestRun) FullLog() string

func (*TestRun) LogFilePath

func (tr *TestRun) LogFilePath() string

func (*TestRun) LogTail

func (tr *TestRun) LogTail() string

func (*TestRun) NormalizedConfig

func (tr *TestRun) NormalizedConfig() *TestRunNormalizedConfig

NormalizedConfig generates a TestRunNormalizedConfig from a raw common.TestRun including the agent data

func (*TestRun) NormalizedConfigWithAgentData

func (tr *TestRun) NormalizedConfigWithAgentData(
	agentData bool,
) *TestRunNormalizedConfig

NormalizedConfigWithAgentData generates a TestRunNormalizedConfig from a raw common.TestRun - where `agentData` determines if it is including the CPU and RAM for each of the roles. If this agent data should be omitted from the config and set to 0 instead, use `agentData = false`. In this case, two test runs with equal numbers of sentinels/shards/etc, but with these roles running in different configurations (i.e. one test run runs 2 sentinels on a 2vCPU instance where the other runs 2 sentinels on a 8vCPU instance) they would still have the same TestRunNormalizedConfig

func (*TestRun) ReadLogTail

func (tr *TestRun) ReadLogTail()

func (*TestRun) WriteLog

func (tr *TestRun) WriteLog(line string)

type TestRunAgentData

type TestRunAgentData struct {
	AgentID      int32           `json:"agentID"`
	SystemInfo   AgentSystemInfo `json:"systemInfo"`
	AgentVersion string          `json:"agentVersion"`
	PingRTT      float64         `json:"pingRTT"`
	AwsRegion    string          `json:"awsRegion"`
}

type TestRunNormalizedConfig

type TestRunNormalizedConfig struct {
	Architecture           string  `json:"architectureID"`
	HourUTC                int     `json:"hourUTC"`
	DayUTC                 int     `json:"dayUTC"`
	MonthUTC               int     `json:"monthUTC"`
	AtomizerCount          int     `json:"atomizers"`
	ClientCount            int     `json:"clients"`
	WatchtowerCount        int     `json:"watchtowers"`
	SentinelCount          int     `json:"sentinels"`
	ShardCount             int     `json:"shards"`
	CoordinatorCount       int     `json:"coordinators"`
	BatchSize              int     `json:"batchSize"`
	WindowSize             int     `json:"windowSize"`
	ShardReplicationFactor int     `json:"shardReplicationFactor"`
	STXOCacheDepth         int     `json:"stxoCacheDepth"`
	TargetBlockInterval    int     `json:"targetBlockInterval"`
	ElectionTimeoutUpper   int     `json:"electionTimeoutUpper"`
	ElectionTimeoutLower   int     `json:"electionTimeoutLower"`
	Heartbeat              int     `json:"heartbeat"`
	RaftMaxBatch           int     `json:"raftMaxBatch"`
	SnapshotDistance       int     `json:"snapshotDistance"`
	LoadGenOutputCount     int     `json:"loadGenOutputCount"`
	LoadGenInputCount      int     `json:"loadGenInputCount"`
	InvalidTxRate          float64 `json:"invalidTxRate"`
	FixedTxRate            float64 `json:"fixedTxRate"`
	BatchDelay             int     `json:"batchDelay"`
	ShardCPU               int     `json:"shardCPU"`
	SentinelCPU            int     `json:"sentinelCPU"`
	WatchtowerCPU          int     `json:"watchtowerCPU"`
	AtomizerCPU            int     `json:"atomizerCPU"`
	CoordinatorCPU         int     `json:"coordinatorCPU"`
	ClientCPU              int     `json:"clientCPU"`
	ShardRAM               int     `json:"shardRAM"`
	SentinelRAM            int     `json:"sentinelRAM"`
	WatchtowerRAM          int     `json:"watchtowerRAM"`
	AtomizerRAM            int     `json:"atomizerRAM"`
	CoordinatorRAM         int     `json:"coordinatorRAM"`
	ClientRAM              int     `json:"clientRAM"`
	MultiRegion            bool    `json:"multiRegion"`
	CommitHash             string  `json:"commitHash"`
	ControllerCommitHash   string  `json:"controllerCommitHash"`
	PreseedCount           int64   `json:"preseedCount"`
	PreseedShards          bool    `json:"preseedShards"`
}

TestRunNormalizedConfig is a flat representation of a testrun's configuration including all parameters that are relevant for comparing test run results between one another. When creating matrices of results, test runs that have all of these parameters in common will be bucketed into the same result row. Using the raw `common.TestRun` type for this doesn't work, since data such as agent IDs, AWS instance IDs will differ for every run - hence this normalized representation that can be generated from the raw testrun.

func (*TestRunNormalizedConfig) Hash

func (trc *TestRunNormalizedConfig) Hash() []byte

Calculates a hash over the normalized config by hashing the serialized JSON representation. Can be used to easily determine if two TestRunNormalizedConfig object are equal

type TestRunRole

type TestRunRole struct {
	Role                SystemRole          `json:"role"`
	Index               int                 `json:"roleIdx"`
	AgentID             int32               `json:"agentID"`
	AwsLaunchTemplateID string              `json:"awsLaunchTemplateID"`
	AwsAgentInstanceId  string              `json:"awsInstanceId"`
	Fail                bool                `json:"fail"`
	Failure             *TestRunRoleFailure `json:"failure"`
}

type TestRunRoleFailure

type TestRunRoleFailure struct {
	After  int  `json:"after"`
	Failed bool `json:"-"`
}

type TestRunStatus

type TestRunStatus string
const TestRunStatusAborted TestRunStatus = "Aborted"
const TestRunStatusCanceled TestRunStatus = "Canceled"
const TestRunStatusCompleted TestRunStatus = "Completed"
const TestRunStatusFailed TestRunStatus = "Failed"
const TestRunStatusInterrupted TestRunStatus = "Interrupted"
const TestRunStatusQueued TestRunStatus = "Queued"
const TestRunStatusRunning TestRunStatus = "Running"
const TestRunStatusUnknown TestRunStatus = "Unknown"

Jump to

Keyboard shortcuts

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