| package types |
| |
| import "time" |
| |
| // AvgTaskDuration is the average duration of a builder subtask. |
| type AvgTaskDuration struct { |
| AvgDuration time.Duration `json:"runtime_nanos"` |
| } |
| |
| // DeviceCount represents the number of available devices of a specific type. |
| type DeviceCount struct { |
| BotCount int `json:"bot_count"` |
| DeviceType string `json:"device_type"` |
| } |
| |
| // TestingTask is a builder testing subtask. |
| type TestingTask struct { |
| Bucket string `json:"bucket"` |
| Builder string `json:"builder"` |
| CreateTime time.Time `json:"create_time_nanos"` |
| DeviceType string `json:"device_type"` |
| Duration time.Duration `json:"task_duration_nanos"` |
| Expiration time.Duration `json:"expiration_nanos"` |
| IsTry bool `json:"is_try"` |
| PendingDuration time.Duration `json:"pending_duration_nanos"` |
| Project string `json:"project"` |
| } |
| |
| // BuilderProfile is a collection of statistics about a builder. |
| type BuilderProfile struct { |
| AverageBuildDuration time.Duration `json:"avg_build_duration"` |
| Builder string `json:"builder"` |
| NumFlakes int `json:"num_flakes"` |
| DeviceFootprints []BuilderDeviceFootprint `json:"device_footprints"` |
| NumBuilds int `json:"num_builds"` |
| Project string `json:"project"` |
| } |
| |
| // BuilderDeviceFootprint is the average device usage of a builder. |
| type BuilderDeviceFootprint struct { |
| AverageTaskDuration time.Duration `json:"avg_task_duration"` |
| AverageTasks int `json:"avg_tasks"` |
| DeviceType string `json:"device_type"` |
| Expiration time.Duration `json:"expiration_nanos"` |
| } |
| |
| // CommitQueueAttempt is a record of an attempt to verify a change for a particular project. |
| type CommitQueueAttempt struct { |
| ConfigGroup string `json:"config_group"` |
| StartTime time.Time `json:"start_time"` |
| } |
| |
| // StepStatus is a snapshot of the internal state of the simulation at a given step. |
| type StepStatus struct { |
| CurrentTime time.Time |
| IdleBots map[string]int |
| RunningTasks []TestingTask |
| TaskRuns []TestingTask |
| WaitingTasks []TestingTask |
| WaitingTimes map[string]time.Duration |
| } |