model

package
v0.0.0-...-dd14e6e Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AppName ...
	AppName = "ymir-app"
	// NodeSelectedKey ...
	NodeSelectedKey = "node-select"
	// DescriptionKey ...
	DescriptionKey = "description"
	// ScriptKey
	ScriptKey = "script"
	WorkKey   = "work"

	TypeTScript = "tscript"
	TypeTResult = "result"
)

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	MasterAddr      string
	TaskSetTimeout  time.Duration
	TimeoutForStart time.Duration
	JobName         string
	WorkID          string
	InstanceID      string
	NodeName        string
}

AgentConfig ...

type Bucket

type Bucket struct {
	Count int
	Cost  time.Duration
}

Bucket ...

type ServerConfig

type ServerConfig struct {
	KubeAddr        string
	TimeoutForStart time.Duration
	JobNamespace    string
	AgentImageName  string
}

ServerConfig is server config

type TJob

type TJob struct {
	Name          string
	CurWorkID     string
	Description   string   // Annotation
	Script        string   // ConfigMap
	Replicas      int      // NodesSelected
	NodesSelected []string // NodesSelected
	Status        string   // JobStatus
	Created       time.Time
}

TJob is a test job config, saved as a job

type TReqResult

type TReqResult struct {
	Name string
	Time time.Time
	Cost time.Duration
	Code int
}

TReqResult ...

type TResult

type TResult struct {
	Name       string
	Start      time.Time
	End        time.Time
	Count      int64
	Sum        time.Duration
	Max        time.Duration
	Avg        time.Duration
	Min        time.Duration
	CodeMap    map[int]int64 // code counter
	Percentile []Bucket
	Buckets    []Bucket
	Lats       []float64
}

TResult ...

type TWork

type TWork struct {
	JobName  string
	WorkID   string
	Replicas int
	Result   []TResult
	Instance []TWorkInstance
	Created  time.Time
}

TWork is a test Work

type TWorkInstance

type TWorkInstance struct {
	JobName    string
	WorkID     string
	InstanceID string
	NodeName   string
	Created    time.Time
	Results    []TResult
}

TWorkInstance in a single node....

Jump to

Keyboard shortcuts

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