metrics

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Updating the BigQuery Schema for Task Events

The metrics.proto contained in this directory defines a TaskEvent message that is used to record structured data about task events. When this proto is modified, the BigQuery tables where the data is stored need to be modified as well.

To create or update a bigquery table, run the following command:

bqschemaupdater -table $PROJECT_ID.qs_events.task_events -message-dir . -message metrics.TaskEvent

where $PROJECT_ID is the appengine project ID, for instance qscheduler-swarming.

Documentation

Overview

Package metrics defines types used for structured logs and metrics of the quotascheduler behavior.

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskEvent_EventCategory_name = map[int32]string{
		0:   "CATEGORY_UNSPECIFIED",
		256: "CATEGORY_SWARMING",
		512: "CATEGORY_QSCHEDULER",
	}
	TaskEvent_EventCategory_value = map[string]int32{
		"CATEGORY_UNSPECIFIED": 0,
		"CATEGORY_SWARMING":    256,
		"CATEGORY_QSCHEDULER":  512,
	}
)

Enum value maps for TaskEvent_EventCategory.

View Source
var (
	TaskEvent_EventType_name = map[int32]string{
		0:   "UNSPECIFIED",
		257: "SWARMING_ENQUEUED",
		258: "SWARMING_COMPLETED",
		513: "QSCHEDULER_ASSIGNED",
		514: "QSCHEDULER_PREEMPTED",
		515: "QSCHEDULER_REPRIORITIZED",
		516: "QSCHEDULER_UNASSIGNED",
	}
	TaskEvent_EventType_value = map[string]int32{
		"UNSPECIFIED":              0,
		"SWARMING_ENQUEUED":        257,
		"SWARMING_COMPLETED":       258,
		"QSCHEDULER_ASSIGNED":      513,
		"QSCHEDULER_PREEMPTED":     514,
		"QSCHEDULER_REPRIORITIZED": 515,
		"QSCHEDULER_UNASSIGNED":    516,
	}
)

Enum value maps for TaskEvent_EventType.

View Source
var (
	TaskEvent_CompletedDetails_Reason_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "BOT_IDLE",
		2: "IDLE_TASK_ABSENT",
		3: "RUNNING_TASK_ABSENT",
		4: "INCONSISTENT_BOT_FOR_TASK",
		5: "INCONSISTENT_TASK_FOR_BOT",
	}
	TaskEvent_CompletedDetails_Reason_value = map[string]int32{
		"UNSPECIFIED":               0,
		"BOT_IDLE":                  1,
		"IDLE_TASK_ABSENT":          2,
		"RUNNING_TASK_ABSENT":       3,
		"INCONSISTENT_BOT_FOR_TASK": 4,
		"INCONSISTENT_TASK_FOR_BOT": 5,
	}
)

Enum value maps for TaskEvent_CompletedDetails_Reason.

View Source
var File_infra_qscheduler_qslib_protos_metrics_metrics_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Account

type Account struct {
	Id *Account_ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The quota scheduler pool that contains this account.
	Pool *Pool `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"`
	// Account's balance at this time.
	Balance []float32 `protobuf:"fixed32,3,rep,packed,name=balance,proto3" json:"balance,omitempty"`
	// The last updated time of the scheduler state where the Account was read.
	SnapshotTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
	// contains filtered or unexported fields
}

Account represents a single account in the snapshot of a scheduler state.

func (*Account) Descriptor deprecated

func (*Account) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetBalance

func (x *Account) GetBalance() []float32

func (*Account) GetId

func (x *Account) GetId() *Account_ID

func (*Account) GetPool

func (x *Account) GetPool() *Pool

func (*Account) GetSnapshotTime

func (x *Account) GetSnapshotTime() *timestamppb.Timestamp

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type Account_ID

type Account_ID struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Id is the quotascheduler account ID.

func (*Account_ID) Descriptor deprecated

func (*Account_ID) Descriptor() ([]byte, []int)

Deprecated: Use Account_ID.ProtoReflect.Descriptor instead.

func (*Account_ID) GetName

func (x *Account_ID) GetName() string

func (*Account_ID) ProtoMessage

func (*Account_ID) ProtoMessage()

func (*Account_ID) ProtoReflect

func (x *Account_ID) ProtoReflect() protoreflect.Message

func (*Account_ID) Reset

func (x *Account_ID) Reset()

func (*Account_ID) String

func (x *Account_ID) String() string

type EventList

type EventList struct {
	Events []*TaskEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

EventList wraps a repeated TaskEvent.

func (*EventList) Descriptor deprecated

func (*EventList) Descriptor() ([]byte, []int)

Deprecated: Use EventList.ProtoReflect.Descriptor instead.

func (*EventList) GetEvents

func (x *EventList) GetEvents() []*TaskEvent

func (*EventList) ProtoMessage

func (*EventList) ProtoMessage()

func (*EventList) ProtoReflect

func (x *EventList) ProtoReflect() protoreflect.Message

func (*EventList) Reset

func (x *EventList) Reset()

func (*EventList) String

func (x *EventList) String() string

type Pool

type Pool struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Pool represents a quota scheduler pool.

func (*Pool) Descriptor deprecated

func (*Pool) Descriptor() ([]byte, []int)

Deprecated: Use Pool.ProtoReflect.Descriptor instead.

func (*Pool) GetId

func (x *Pool) GetId() string

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) ProtoReflect

func (x *Pool) ProtoReflect() protoreflect.Message

func (*Pool) Reset

func (x *Pool) Reset()

func (*Pool) String

func (x *Pool) String() string

type SchedulerState

type SchedulerState struct {
	QueuedTasks    []*SchedulerState_Task    `protobuf:"bytes,1,rep,name=queued_tasks,json=queuedTasks,proto3" json:"queued_tasks,omitempty"`
	RunningTasks   []*SchedulerState_Task    `protobuf:"bytes,2,rep,name=running_tasks,json=runningTasks,proto3" json:"running_tasks,omitempty"`
	IdleWorkers    []*SchedulerState_Worker  `protobuf:"bytes,3,rep,name=idle_workers,json=idleWorkers,proto3" json:"idle_workers,omitempty"`
	RunningWorkers []*SchedulerState_Worker  `protobuf:"bytes,4,rep,name=running_workers,json=runningWorkers,proto3" json:"running_workers,omitempty"`
	Accounts       []*SchedulerState_Account `protobuf:"bytes,5,rep,name=accounts,proto3" json:"accounts,omitempty"`
	PoolId         string                    `protobuf:"bytes,6,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// Time is the time at which the snapshot was created.
	Time *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

TODO: Remove SchedulerState once the Task/Worker/Account type is implemented. SchedulerState represents the scheuler state.

func (*SchedulerState) Descriptor deprecated

func (*SchedulerState) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerState.ProtoReflect.Descriptor instead.

func (*SchedulerState) GetAccounts

func (x *SchedulerState) GetAccounts() []*SchedulerState_Account

func (*SchedulerState) GetIdleWorkers

func (x *SchedulerState) GetIdleWorkers() []*SchedulerState_Worker

func (*SchedulerState) GetPoolId

func (x *SchedulerState) GetPoolId() string

func (*SchedulerState) GetQueuedTasks

func (x *SchedulerState) GetQueuedTasks() []*SchedulerState_Task

func (*SchedulerState) GetRunningTasks

func (x *SchedulerState) GetRunningTasks() []*SchedulerState_Task

func (*SchedulerState) GetRunningWorkers

func (x *SchedulerState) GetRunningWorkers() []*SchedulerState_Worker

func (*SchedulerState) GetTime

func (x *SchedulerState) GetTime() *timestamppb.Timestamp

func (*SchedulerState) ProtoMessage

func (*SchedulerState) ProtoMessage()

func (*SchedulerState) ProtoReflect

func (x *SchedulerState) ProtoReflect() protoreflect.Message

func (*SchedulerState) Reset

func (x *SchedulerState) Reset()

func (*SchedulerState) String

func (x *SchedulerState) String() string

type SchedulerState_Account

type SchedulerState_Account struct {
	Id      string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Balance []float32 `protobuf:"fixed32,2,rep,packed,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*SchedulerState_Account) Descriptor deprecated

func (*SchedulerState_Account) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerState_Account.ProtoReflect.Descriptor instead.

func (*SchedulerState_Account) GetBalance

func (x *SchedulerState_Account) GetBalance() []float32

func (*SchedulerState_Account) GetId

func (x *SchedulerState_Account) GetId() string

func (*SchedulerState_Account) ProtoMessage

func (*SchedulerState_Account) ProtoMessage()

func (*SchedulerState_Account) ProtoReflect

func (x *SchedulerState_Account) ProtoReflect() protoreflect.Message

func (*SchedulerState_Account) Reset

func (x *SchedulerState_Account) Reset()

func (*SchedulerState_Account) String

func (x *SchedulerState_Account) String() string

type SchedulerState_Task

type SchedulerState_Task struct {
	Id                  string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	AccountId           string   `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	WorkerId            string   `protobuf:"bytes,3,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	BaseLabels          []string `protobuf:"bytes,4,rep,name=base_labels,json=baseLabels,proto3" json:"base_labels,omitempty"`
	ProvisionableLabels []string `protobuf:"bytes,5,rep,name=provisionable_labels,json=provisionableLabels,proto3" json:"provisionable_labels,omitempty"`
	// contains filtered or unexported fields
}

func (*SchedulerState_Task) Descriptor deprecated

func (*SchedulerState_Task) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerState_Task.ProtoReflect.Descriptor instead.

func (*SchedulerState_Task) GetAccountId

func (x *SchedulerState_Task) GetAccountId() string

func (*SchedulerState_Task) GetBaseLabels

func (x *SchedulerState_Task) GetBaseLabels() []string

func (*SchedulerState_Task) GetId

func (x *SchedulerState_Task) GetId() string

func (*SchedulerState_Task) GetProvisionableLabels

func (x *SchedulerState_Task) GetProvisionableLabels() []string

func (*SchedulerState_Task) GetWorkerId

func (x *SchedulerState_Task) GetWorkerId() string

func (*SchedulerState_Task) ProtoMessage

func (*SchedulerState_Task) ProtoMessage()

func (*SchedulerState_Task) ProtoReflect

func (x *SchedulerState_Task) ProtoReflect() protoreflect.Message

func (*SchedulerState_Task) Reset

func (x *SchedulerState_Task) Reset()

func (*SchedulerState_Task) String

func (x *SchedulerState_Task) String() string

type SchedulerState_Worker

type SchedulerState_Worker struct {
	Id     string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	TaskId string   `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Labels []string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

func (*SchedulerState_Worker) Descriptor deprecated

func (*SchedulerState_Worker) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerState_Worker.ProtoReflect.Descriptor instead.

func (*SchedulerState_Worker) GetId

func (x *SchedulerState_Worker) GetId() string

func (*SchedulerState_Worker) GetLabels

func (x *SchedulerState_Worker) GetLabels() []string

func (*SchedulerState_Worker) GetTaskId

func (x *SchedulerState_Worker) GetTaskId() string

func (*SchedulerState_Worker) ProtoMessage

func (*SchedulerState_Worker) ProtoMessage()

func (*SchedulerState_Worker) ProtoReflect

func (x *SchedulerState_Worker) ProtoReflect() protoreflect.Message

func (*SchedulerState_Worker) Reset

func (x *SchedulerState_Worker) Reset()

func (*SchedulerState_Worker) String

func (x *SchedulerState_Worker) String() string

type Task

type Task struct {
	Id *Task_ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The quota scheduler pool that contains the account of this task.
	Pool *Pool `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"`
	// The account that the task attached.
	AccountId *Account_ID `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// The worker Id if this task is assigned, or empty if the task is queued.
	WorkerId            *Worker_ID `protobuf:"bytes,4,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	BaseLabels          []string   `protobuf:"bytes,5,rep,name=base_labels,json=baseLabels,proto3" json:"base_labels,omitempty"`
	ProvisionableLabels []string   `protobuf:"bytes,6,rep,name=provisionable_labels,json=provisionableLabels,proto3" json:"provisionable_labels,omitempty"`
	// The last updated time of the scheduler state where the Task was read.
	SnapshotTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
	// contains filtered or unexported fields
}

Task represents a single task in the snapshot of a scheduler state.

func (*Task) Descriptor deprecated

func (*Task) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetAccountId

func (x *Task) GetAccountId() *Account_ID

func (*Task) GetBaseLabels

func (x *Task) GetBaseLabels() []string

func (*Task) GetId

func (x *Task) GetId() *Task_ID

func (*Task) GetPool

func (x *Task) GetPool() *Pool

func (*Task) GetProvisionableLabels

func (x *Task) GetProvisionableLabels() []string

func (*Task) GetSnapshotTime

func (x *Task) GetSnapshotTime() *timestamppb.Timestamp

func (*Task) GetWorkerId

func (x *Task) GetWorkerId() *Worker_ID

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TaskEvent

type TaskEvent struct {

	// EventType is the type of event that occurred.
	EventType TaskEvent_EventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=metrics.TaskEvent_EventType" json:"event_type,omitempty"`
	// SchedulerId is the ID of the scheduler in which the event occurred.
	SchedulerId string `protobuf:"bytes,2,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"`
	// TaskId is the task ID that the event happened to.
	TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Time is the time at which the event happened.
	Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"`
	// BaseLabels are the base labels of the task.
	BaseLabels []string `protobuf:"bytes,5,rep,name=base_labels,json=baseLabels,proto3" json:"base_labels,omitempty"`
	// ProvisionableLabels are the provisionable labels of the task.
	ProvisionableLabels []string `protobuf:"bytes,6,rep,name=provisionable_labels,json=provisionableLabels,proto3" json:"provisionable_labels,omitempty"`
	// AccountId is the quotascheduler account that the task will be charged to.
	AccountId string `protobuf:"bytes,7,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// AccountValid indicates whether this task's quotascheduler account is valid
	// (exists) at this time.
	AccountValid bool `protobuf:"varint,8,opt,name=account_valid,json=accountValid,proto3" json:"account_valid,omitempty"`
	// AccountBalance is the task's quotascheduler account's balance at this time.
	AccountBalance []float32 `protobuf:"fixed32,9,rep,packed,name=account_balance,json=accountBalance,proto3" json:"account_balance,omitempty"`
	// Cost is the total quota cost accumulated so far to the quotascheduler
	// account, when running this task.
	Cost []float32 `protobuf:"fixed32,10,rep,packed,name=cost,proto3" json:"cost,omitempty"`
	// BotId is the bot that the event occurred on (relevant for all event
	// types except for ENQUEUED).
	BotId string `protobuf:"bytes,11,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// BotDimensions are the dimensions of the bot (if relevant).
	BotDimensions []string `protobuf:"bytes,12,rep,name=bot_dimensions,json=botDimensions,proto3" json:"bot_dimensions,omitempty"`
	// Category is the EventCategory for this event's EventType.
	Category TaskEvent_EventCategory `protobuf:"varint,13,opt,name=category,proto3,enum=metrics.TaskEvent_EventCategory" json:"category,omitempty"`
	// IsCallback specifies whether this event was due to a notification callback
	// from swarming that was requested by the scheduler. This is for diagnostic
	// purposes only, and is only applicable for events of category
	// CATEGORY_SWARMING.
	IsCallback bool `protobuf:"varint,14,opt,name=is_callback,json=isCallback,proto3" json:"is_callback,omitempty"`
	// Types that are assignable to Details:
	//	*TaskEvent_EnqueuedDetails_
	//	*TaskEvent_AssignedDetails_
	//	*TaskEvent_PreemptedDetails_
	//	*TaskEvent_ReprioritizedDetails_
	//	*TaskEvent_CompletedDetails_
	//	*TaskEvent_UnassignedDetails_
	Details isTaskEvent_Details `protobuf_oneof:"details"`
	// contains filtered or unexported fields
}

TaskEvent represents a quotascheduler event that happened to a particular task, for metrics purposes.

This proto is intended to be used as a schema for a BigQuery table, in which events are logged.

func (*TaskEvent) Descriptor deprecated

func (*TaskEvent) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent.ProtoReflect.Descriptor instead.

func (*TaskEvent) GetAccountBalance

func (x *TaskEvent) GetAccountBalance() []float32

func (*TaskEvent) GetAccountId

func (x *TaskEvent) GetAccountId() string

func (*TaskEvent) GetAccountValid

func (x *TaskEvent) GetAccountValid() bool

func (*TaskEvent) GetAssignedDetails

func (x *TaskEvent) GetAssignedDetails() *TaskEvent_AssignedDetails

func (*TaskEvent) GetBaseLabels

func (x *TaskEvent) GetBaseLabels() []string

func (*TaskEvent) GetBotDimensions

func (x *TaskEvent) GetBotDimensions() []string

func (*TaskEvent) GetBotId

func (x *TaskEvent) GetBotId() string

func (*TaskEvent) GetCategory

func (x *TaskEvent) GetCategory() TaskEvent_EventCategory

func (*TaskEvent) GetCompletedDetails

func (x *TaskEvent) GetCompletedDetails() *TaskEvent_CompletedDetails

func (*TaskEvent) GetCost

func (x *TaskEvent) GetCost() []float32

func (*TaskEvent) GetDetails

func (m *TaskEvent) GetDetails() isTaskEvent_Details

func (*TaskEvent) GetEnqueuedDetails

func (x *TaskEvent) GetEnqueuedDetails() *TaskEvent_EnqueuedDetails

func (*TaskEvent) GetEventType

func (x *TaskEvent) GetEventType() TaskEvent_EventType

func (*TaskEvent) GetIsCallback

func (x *TaskEvent) GetIsCallback() bool

func (*TaskEvent) GetPreemptedDetails

func (x *TaskEvent) GetPreemptedDetails() *TaskEvent_PreemptedDetails

func (*TaskEvent) GetProvisionableLabels

func (x *TaskEvent) GetProvisionableLabels() []string

func (*TaskEvent) GetReprioritizedDetails

func (x *TaskEvent) GetReprioritizedDetails() *TaskEvent_ReprioritizedDetails

func (*TaskEvent) GetSchedulerId

func (x *TaskEvent) GetSchedulerId() string

func (*TaskEvent) GetTaskId

func (x *TaskEvent) GetTaskId() string

func (*TaskEvent) GetTime

func (x *TaskEvent) GetTime() *timestamppb.Timestamp

func (*TaskEvent) GetUnassignedDetails

func (x *TaskEvent) GetUnassignedDetails() *TaskEvent_UnassignedDetails

func (*TaskEvent) ProtoMessage

func (*TaskEvent) ProtoMessage()

func (*TaskEvent) ProtoReflect

func (x *TaskEvent) ProtoReflect() protoreflect.Message

func (*TaskEvent) Reset

func (x *TaskEvent) Reset()

func (*TaskEvent) String

func (x *TaskEvent) String() string

type TaskEvent_AssignedDetails

type TaskEvent_AssignedDetails struct {

	// ProvisionRequired is whether provision is required to run this task
	// on the bot (i.e. if a slice other than the 0th slice was selected).
	ProvisionRequired bool `protobuf:"varint,1,opt,name=provision_required,json=provisionRequired,proto3" json:"provision_required,omitempty"`
	// Priority is the qscheduler priority that the task is running at.
	Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
	// Preempting is true if this task preempted another one that was already
	// running on the bot.
	Preempting bool `protobuf:"varint,3,opt,name=preempting,proto3" json:"preempting,omitempty"`
	// PreemptionCost is the cost paid by this task's account in order to
	// preempt the previous task on this bot, if this was a preempting
	// assignment.
	PreemptionCost []float32 `protobuf:"fixed32,4,rep,packed,name=preemption_cost,json=preemptionCost,proto3" json:"preemption_cost,omitempty"`
	// PreemptedTaskId is the task that was preempted, if any.
	PreemptedTaskId string `protobuf:"bytes,5,opt,name=preempted_task_id,json=preemptedTaskId,proto3" json:"preempted_task_id,omitempty"`
	// contains filtered or unexported fields
}

AssignedDetails represents event details that are specific to the ASSIGNED event type.

func (*TaskEvent_AssignedDetails) Descriptor deprecated

func (*TaskEvent_AssignedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_AssignedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_AssignedDetails) GetPreemptedTaskId

func (x *TaskEvent_AssignedDetails) GetPreemptedTaskId() string

func (*TaskEvent_AssignedDetails) GetPreempting

func (x *TaskEvent_AssignedDetails) GetPreempting() bool

func (*TaskEvent_AssignedDetails) GetPreemptionCost

func (x *TaskEvent_AssignedDetails) GetPreemptionCost() []float32

func (*TaskEvent_AssignedDetails) GetPriority

func (x *TaskEvent_AssignedDetails) GetPriority() int32

func (*TaskEvent_AssignedDetails) GetProvisionRequired

func (x *TaskEvent_AssignedDetails) GetProvisionRequired() bool

func (*TaskEvent_AssignedDetails) ProtoMessage

func (*TaskEvent_AssignedDetails) ProtoMessage()

func (*TaskEvent_AssignedDetails) ProtoReflect

func (*TaskEvent_AssignedDetails) Reset

func (x *TaskEvent_AssignedDetails) Reset()

func (*TaskEvent_AssignedDetails) String

func (x *TaskEvent_AssignedDetails) String() string

type TaskEvent_AssignedDetails_

type TaskEvent_AssignedDetails_ struct {
	AssignedDetails *TaskEvent_AssignedDetails `protobuf:"bytes,101,opt,name=assigned_details,json=assignedDetails,proto3,oneof"`
}

type TaskEvent_CompletedDetails

type TaskEvent_CompletedDetails struct {
	Reason TaskEvent_CompletedDetails_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=metrics.TaskEvent_CompletedDetails_Reason" json:"reason,omitempty"`
	// If reason is INCONSISTENT_TASK_FOR_BOT, other_task specifies which task
	// it was that notified itself on this bot.
	OtherTask string `protobuf:"bytes,2,opt,name=other_task,json=otherTask,proto3" json:"other_task,omitempty"`
	// If reason is INCONSISTENT_BOT_FOR_TASK, other_bot specifies which bot
	// it was that was notified with this task.
	OtherBot string `protobuf:"bytes,3,opt,name=other_bot,json=otherBot,proto3" json:"other_bot,omitempty"`
	// contains filtered or unexported fields
}

ReprioritizedDetails represents event details that are specific to the COMPLETED event type.

func (*TaskEvent_CompletedDetails) Descriptor deprecated

func (*TaskEvent_CompletedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_CompletedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_CompletedDetails) GetOtherBot

func (x *TaskEvent_CompletedDetails) GetOtherBot() string

func (*TaskEvent_CompletedDetails) GetOtherTask

func (x *TaskEvent_CompletedDetails) GetOtherTask() string

func (*TaskEvent_CompletedDetails) GetReason

func (*TaskEvent_CompletedDetails) ProtoMessage

func (*TaskEvent_CompletedDetails) ProtoMessage()

func (*TaskEvent_CompletedDetails) ProtoReflect

func (*TaskEvent_CompletedDetails) Reset

func (x *TaskEvent_CompletedDetails) Reset()

func (*TaskEvent_CompletedDetails) String

func (x *TaskEvent_CompletedDetails) String() string

type TaskEvent_CompletedDetails_

type TaskEvent_CompletedDetails_ struct {
	CompletedDetails *TaskEvent_CompletedDetails `protobuf:"bytes,104,opt,name=completed_details,json=completedDetails,proto3,oneof"`
}

type TaskEvent_CompletedDetails_Reason

type TaskEvent_CompletedDetails_Reason int32
const (
	TaskEvent_CompletedDetails_UNSPECIFIED TaskEvent_CompletedDetails_Reason = 0
	// The bot that was previously assigned this task became idle.
	TaskEvent_CompletedDetails_BOT_IDLE TaskEvent_CompletedDetails_Reason = 1
	// The task became absent while it was still idle.
	TaskEvent_CompletedDetails_IDLE_TASK_ABSENT TaskEvent_CompletedDetails_Reason = 2
	// The task becamse absent while it was running.
	TaskEvent_CompletedDetails_RUNNING_TASK_ABSENT TaskEvent_CompletedDetails_Reason = 3
	// The task was believed to be running on a bot, but the scheduler was
	// notified that it was running on a different bot, so its state was
	// deleted.
	TaskEvent_CompletedDetails_INCONSISTENT_BOT_FOR_TASK TaskEvent_CompletedDetails_Reason = 4
	// The task was believed the be running on a bot, but the scheduler was
	// notified that a different task is running on the bot, so its state was
	// deleted.
	TaskEvent_CompletedDetails_INCONSISTENT_TASK_FOR_BOT TaskEvent_CompletedDetails_Reason = 5
)

func (TaskEvent_CompletedDetails_Reason) Descriptor

func (TaskEvent_CompletedDetails_Reason) Enum

func (TaskEvent_CompletedDetails_Reason) EnumDescriptor deprecated

func (TaskEvent_CompletedDetails_Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskEvent_CompletedDetails_Reason.Descriptor instead.

func (TaskEvent_CompletedDetails_Reason) Number

func (TaskEvent_CompletedDetails_Reason) String

func (TaskEvent_CompletedDetails_Reason) Type

type TaskEvent_EnqueuedDetails

type TaskEvent_EnqueuedDetails struct {

	// Tags is the set of swarming tags for the task.
	Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

EnqueuedDetails represents event details that are specific to the ENQUEUED event type.

func (*TaskEvent_EnqueuedDetails) Descriptor deprecated

func (*TaskEvent_EnqueuedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_EnqueuedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_EnqueuedDetails) GetTags

func (x *TaskEvent_EnqueuedDetails) GetTags() []string

func (*TaskEvent_EnqueuedDetails) ProtoMessage

func (*TaskEvent_EnqueuedDetails) ProtoMessage()

func (*TaskEvent_EnqueuedDetails) ProtoReflect

func (*TaskEvent_EnqueuedDetails) Reset

func (x *TaskEvent_EnqueuedDetails) Reset()

func (*TaskEvent_EnqueuedDetails) String

func (x *TaskEvent_EnqueuedDetails) String() string

type TaskEvent_EnqueuedDetails_

type TaskEvent_EnqueuedDetails_ struct {
	EnqueuedDetails *TaskEvent_EnqueuedDetails `protobuf:"bytes,100,opt,name=enqueued_details,json=enqueuedDetails,proto3,oneof"`
}

type TaskEvent_EventCategory

type TaskEvent_EventCategory int32
const (
	TaskEvent_CATEGORY_UNSPECIFIED TaskEvent_EventCategory = 0
	// CATEGORY_SWARMING events are due to new information from swarming.
	TaskEvent_CATEGORY_SWARMING TaskEvent_EventCategory = 256
	// CATEGORY_QSCHEDULER events are due to a decision made by quotascheduler.
	TaskEvent_CATEGORY_QSCHEDULER TaskEvent_EventCategory = 512
)

func (TaskEvent_EventCategory) Descriptor

func (TaskEvent_EventCategory) Enum

func (TaskEvent_EventCategory) EnumDescriptor deprecated

func (TaskEvent_EventCategory) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskEvent_EventCategory.Descriptor instead.

func (TaskEvent_EventCategory) Number

func (TaskEvent_EventCategory) String

func (x TaskEvent_EventCategory) String() string

func (TaskEvent_EventCategory) Type

type TaskEvent_EventType

type TaskEvent_EventType int32
const (
	// Invalid or unspecified event type.
	TaskEvent_UNSPECIFIED TaskEvent_EventType = 0
	// Task was enqueued.
	TaskEvent_SWARMING_ENQUEUED TaskEvent_EventType = 257
	// Task completed (was removed from running worker or from queue).
	TaskEvent_SWARMING_COMPLETED TaskEvent_EventType = 258
	// Task was assigned to a bot.
	TaskEvent_QSCHEDULER_ASSIGNED TaskEvent_EventType = 513
	// Task (which was previously assigned to a bot) was interrupted by another
	// task.
	TaskEvent_QSCHEDULER_PREEMPTED TaskEvent_EventType = 514
	// Task (which was previously assigned to a bot) changed its running
	// priority.
	TaskEvent_QSCHEDULER_REPRIORITIZED TaskEvent_EventType = 515
	// Task (which was previously assigned to a bot) was unassigned and moved
	// back to the queue.
	TaskEvent_QSCHEDULER_UNASSIGNED TaskEvent_EventType = 516
)

func (TaskEvent_EventType) Descriptor

func (TaskEvent_EventType) Enum

func (TaskEvent_EventType) EnumDescriptor deprecated

func (TaskEvent_EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskEvent_EventType.Descriptor instead.

func (TaskEvent_EventType) Number

func (TaskEvent_EventType) String

func (x TaskEvent_EventType) String() string

func (TaskEvent_EventType) Type

type TaskEvent_PreemptedDetails

type TaskEvent_PreemptedDetails struct {

	// PreemptingAccountId is the account id of the task that preempted this
	// task.
	PreemptingAccountId string `protobuf:"bytes,1,opt,name=preempting_account_id,json=preemptingAccountId,proto3" json:"preempting_account_id,omitempty"`
	// PreemptingTaskId is the task id of the task that preempted this task.
	PreemptingTaskId string `protobuf:"bytes,2,opt,name=preempting_task_id,json=preemptingTaskId,proto3" json:"preempting_task_id,omitempty"`
	// Priority is the priority that this task was running at prior to being
	// preempted.
	Priority int32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
	// PreemptingPriority is the priority of the task that preempted this task.
	PreemptingPriority int32 `protobuf:"varint,4,opt,name=preempting_priority,json=preemptingPriority,proto3" json:"preempting_priority,omitempty"`
	// contains filtered or unexported fields
}

PreemptedDetails represents event details that are specific to the PREEMPTED event type.

func (*TaskEvent_PreemptedDetails) Descriptor deprecated

func (*TaskEvent_PreemptedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_PreemptedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_PreemptedDetails) GetPreemptingAccountId

func (x *TaskEvent_PreemptedDetails) GetPreemptingAccountId() string

func (*TaskEvent_PreemptedDetails) GetPreemptingPriority

func (x *TaskEvent_PreemptedDetails) GetPreemptingPriority() int32

func (*TaskEvent_PreemptedDetails) GetPreemptingTaskId

func (x *TaskEvent_PreemptedDetails) GetPreemptingTaskId() string

func (*TaskEvent_PreemptedDetails) GetPriority

func (x *TaskEvent_PreemptedDetails) GetPriority() int32

func (*TaskEvent_PreemptedDetails) ProtoMessage

func (*TaskEvent_PreemptedDetails) ProtoMessage()

func (*TaskEvent_PreemptedDetails) ProtoReflect

func (*TaskEvent_PreemptedDetails) Reset

func (x *TaskEvent_PreemptedDetails) Reset()

func (*TaskEvent_PreemptedDetails) String

func (x *TaskEvent_PreemptedDetails) String() string

type TaskEvent_PreemptedDetails_

type TaskEvent_PreemptedDetails_ struct {
	PreemptedDetails *TaskEvent_PreemptedDetails `protobuf:"bytes,102,opt,name=preempted_details,json=preemptedDetails,proto3,oneof"`
}

type TaskEvent_ReprioritizedDetails

type TaskEvent_ReprioritizedDetails struct {

	// OldPriority is the previous priority the task was running at.
	OldPriority int32 `protobuf:"varint,1,opt,name=old_priority,json=oldPriority,proto3" json:"old_priority,omitempty"`
	// NewPriority is the new priority the task is running at.
	NewPriority int32 `protobuf:"varint,2,opt,name=new_priority,json=newPriority,proto3" json:"new_priority,omitempty"`
	// contains filtered or unexported fields
}

ReprioritizedDetails represents event details that are specific to the PREPRIORITIZED event type.

func (*TaskEvent_ReprioritizedDetails) Descriptor deprecated

func (*TaskEvent_ReprioritizedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_ReprioritizedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_ReprioritizedDetails) GetNewPriority

func (x *TaskEvent_ReprioritizedDetails) GetNewPriority() int32

func (*TaskEvent_ReprioritizedDetails) GetOldPriority

func (x *TaskEvent_ReprioritizedDetails) GetOldPriority() int32

func (*TaskEvent_ReprioritizedDetails) ProtoMessage

func (*TaskEvent_ReprioritizedDetails) ProtoMessage()

func (*TaskEvent_ReprioritizedDetails) ProtoReflect

func (*TaskEvent_ReprioritizedDetails) Reset

func (x *TaskEvent_ReprioritizedDetails) Reset()

func (*TaskEvent_ReprioritizedDetails) String

type TaskEvent_ReprioritizedDetails_

type TaskEvent_ReprioritizedDetails_ struct {
	ReprioritizedDetails *TaskEvent_ReprioritizedDetails `protobuf:"bytes,103,opt,name=reprioritized_details,json=reprioritizedDetails,proto3,oneof"`
}

type TaskEvent_UnassignedDetails

type TaskEvent_UnassignedDetails struct {
	// contains filtered or unexported fields
}

UnassignedDetails represents event details that are specific to the UNASSIGNED event type.

func (*TaskEvent_UnassignedDetails) Descriptor deprecated

func (*TaskEvent_UnassignedDetails) Descriptor() ([]byte, []int)

Deprecated: Use TaskEvent_UnassignedDetails.ProtoReflect.Descriptor instead.

func (*TaskEvent_UnassignedDetails) ProtoMessage

func (*TaskEvent_UnassignedDetails) ProtoMessage()

func (*TaskEvent_UnassignedDetails) ProtoReflect

func (*TaskEvent_UnassignedDetails) Reset

func (x *TaskEvent_UnassignedDetails) Reset()

func (*TaskEvent_UnassignedDetails) String

func (x *TaskEvent_UnassignedDetails) String() string

type TaskEvent_UnassignedDetails_

type TaskEvent_UnassignedDetails_ struct {
	UnassignedDetails *TaskEvent_UnassignedDetails `protobuf:"bytes,105,opt,name=unassigned_details,json=unassignedDetails,proto3,oneof"`
}

type Task_ID

type Task_ID struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Id is the ID of this task.

func (*Task_ID) Descriptor deprecated

func (*Task_ID) Descriptor() ([]byte, []int)

Deprecated: Use Task_ID.ProtoReflect.Descriptor instead.

func (*Task_ID) GetName

func (x *Task_ID) GetName() string

func (*Task_ID) ProtoMessage

func (*Task_ID) ProtoMessage()

func (*Task_ID) ProtoReflect

func (x *Task_ID) ProtoReflect() protoreflect.Message

func (*Task_ID) Reset

func (x *Task_ID) Reset()

func (*Task_ID) String

func (x *Task_ID) String() string

type Worker

type Worker struct {
	Id *Worker_ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The quota scheduler pool this worker serves.
	Pool *Pool `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"`
	// The task that is running on this worker. Empty if this worker is idle.
	TaskId *Task_ID `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
	// The last updated time of the scheduler state where the Worker was read.
	SnapshotTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
	// contains filtered or unexported fields
}

Worker represents a single worker in the snapshot of a scheduler state.

func (*Worker) Descriptor deprecated

func (*Worker) Descriptor() ([]byte, []int)

Deprecated: Use Worker.ProtoReflect.Descriptor instead.

func (*Worker) GetId

func (x *Worker) GetId() *Worker_ID

func (*Worker) GetLabels

func (x *Worker) GetLabels() []string

func (*Worker) GetPool

func (x *Worker) GetPool() *Pool

func (*Worker) GetSnapshotTime

func (x *Worker) GetSnapshotTime() *timestamppb.Timestamp

func (*Worker) GetTaskId

func (x *Worker) GetTaskId() *Task_ID

func (*Worker) ProtoMessage

func (*Worker) ProtoMessage()

func (*Worker) ProtoReflect

func (x *Worker) ProtoReflect() protoreflect.Message

func (*Worker) Reset

func (x *Worker) Reset()

func (*Worker) String

func (x *Worker) String() string

type Worker_ID

type Worker_ID struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Id is the ID of this worker.

func (*Worker_ID) Descriptor deprecated

func (*Worker_ID) Descriptor() ([]byte, []int)

Deprecated: Use Worker_ID.ProtoReflect.Descriptor instead.

func (*Worker_ID) GetName

func (x *Worker_ID) GetName() string

func (*Worker_ID) ProtoMessage

func (*Worker_ID) ProtoMessage()

func (*Worker_ID) ProtoReflect

func (x *Worker_ID) ProtoReflect() protoreflect.Message

func (*Worker_ID) Reset

func (x *Worker_ID) Reset()

func (*Worker_ID) String

func (x *Worker_ID) String() string

Jump to

Keyboard shortcuts

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