schema

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncStatus_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "SYNC_STATUS_FAILURE",
		2: "SYNC_STATUS_SUCCESS",
		3: "SYNC_STATUS_NO_OP",
	}
	SyncStatus_value = map[string]int32{
		"UNSPECIFIED":         0,
		"SYNC_STATUS_FAILURE": 1,
		"SYNC_STATUS_SUCCESS": 2,
		"SYNC_STATUS_NO_OP":   3,
	}
)

Enum value maps for SyncStatus.

View Source
var File_infra_appengine_depot_tools_metrics_schema_schema_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BotMetrics

type BotMetrics struct {

	// The build from which this command was executed.
	BuildId int64 `protobuf:"varint,1,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
	// The builder corresponding to the build.
	Builder *proto.BuilderID `protobuf:"bytes,2,opt,name=builder,proto3" json:"builder,omitempty"`
	// contains filtered or unexported fields
}

BotMetrics stores information about the bot environment from which the command was executed.

func (*BotMetrics) Descriptor deprecated

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

Deprecated: Use BotMetrics.ProtoReflect.Descriptor instead.

func (*BotMetrics) GetBuildId

func (x *BotMetrics) GetBuildId() int64

func (*BotMetrics) GetBuilder

func (x *BotMetrics) GetBuilder() *proto.BuilderID

func (*BotMetrics) ProtoMessage

func (*BotMetrics) ProtoMessage()

func (*BotMetrics) ProtoReflect

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

func (*BotMetrics) Reset

func (x *BotMetrics) Reset()

func (*BotMetrics) String

func (x *BotMetrics) String() string

type GitDependency

type GitDependency struct {

	// The path where this dependency was synced, relative to gclient root.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The url for the dependency.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// The revision the dependency was synced to.
	Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
	// Time to sync dependency to revision in seconds.
	ExecutionTime float64 `protobuf:"fixed64,4,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"`
	// Whether we failed to sync the dependency to the desired revision.
	SyncStatus SyncStatus `protobuf:"varint,5,opt,name=sync_status,json=syncStatus,proto3,enum=schema.SyncStatus" json:"sync_status,omitempty"`
	// contains filtered or unexported fields
}

GitDependency stores information about the git dependencies for the current project.

func (*GitDependency) Descriptor deprecated

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

Deprecated: Use GitDependency.ProtoReflect.Descriptor instead.

func (*GitDependency) GetExecutionTime

func (x *GitDependency) GetExecutionTime() float64

func (*GitDependency) GetPath

func (x *GitDependency) GetPath() string

func (*GitDependency) GetRevision

func (x *GitDependency) GetRevision() string

func (*GitDependency) GetSyncStatus

func (x *GitDependency) GetSyncStatus() SyncStatus

func (*GitDependency) GetUrl

func (x *GitDependency) GetUrl() string

func (*GitDependency) ProtoMessage

func (*GitDependency) ProtoMessage()

func (*GitDependency) ProtoReflect

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

func (*GitDependency) Reset

func (x *GitDependency) Reset()

func (*GitDependency) String

func (x *GitDependency) String() string

type Hook

type Hook struct {

	// The command that was executed.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// The name of the hook.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The directory where to execute the hook.
	Cwd string `protobuf:"bytes,3,opt,name=cwd,proto3" json:"cwd,omitempty"`
	// Conditional string. The hook is run if it evaluates to true.
	Condition string `protobuf:"bytes,4,opt,name=condition,proto3" json:"condition,omitempty"`
	// Time it took to execute the hook.
	ExecutionTime float64 `protobuf:"fixed64,5,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"`
	// The exit code of the hook.
	ExitCode int64 `protobuf:"varint,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// contains filtered or unexported fields
}

Hook stores information about hooks run as part of gclient.

func (*Hook) Descriptor deprecated

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

Deprecated: Use Hook.ProtoReflect.Descriptor instead.

func (*Hook) GetAction

func (x *Hook) GetAction() string

func (*Hook) GetCondition

func (x *Hook) GetCondition() string

func (*Hook) GetCwd

func (x *Hook) GetCwd() string

func (*Hook) GetExecutionTime

func (x *Hook) GetExecutionTime() float64

func (*Hook) GetExitCode

func (x *Hook) GetExitCode() int64

func (*Hook) GetName

func (x *Hook) GetName() string

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) ProtoReflect

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

func (*Hook) Reset

func (x *Hook) Reset()

func (*Hook) String

func (x *Hook) String() string

type HttpRequest

type HttpRequest struct {

	// The host the request was made to. Must be one of the |knownHTTPHosts| in
	// metrics/constants.go.
	// e.g. chromium-review.googlesource.com
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// The HTTP method used to make the request (e.g. GET, POST).
	Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	// The path and URL arguments of the request.
	// The path must be one of the |knownHTTPPaths| and the arguments must be
	// |knownHTTPArguments| as defined in metrics/constants.go.
	//
	// The URL is not recorded since it might contain PII. Similarly, in most
	// cases, only the name of the arguments (and not their values) are recorded.
	// When the possible values for an argument is a fixed set, as is the case for
	// "o-parameters" in Gerrit, they'll be recorded as arguments.
	// Each argument is recorded separately, so as to make it easier to query.
	//
	// e.g. If the request was to
	// '/changes/?q=owner:foo@example.com+is:open&n=3&o=LABELS&o=ALL_REVISIONS'
	// The path will be '/changes' and the arguments will be 'q', 'n', 'o',
	// 'LABELS' and 'ALL_REVISIONS'.
	Path      string   `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Arguments []string `protobuf:"bytes,4,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// The HTTP response status.
	Status int64 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
	// The latency of the HTTP request in seconds.
	// TODO(ehmaldonado): Consider converting to google.protobuf.Duration.
	ResponseTime float64 `protobuf:"fixed64,6,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
	// contains filtered or unexported fields
}

HttpRequest stores information on the HTTP requests made by the command.

func (*HttpRequest) Descriptor deprecated

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

Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.

func (*HttpRequest) GetArguments

func (x *HttpRequest) GetArguments() []string

func (*HttpRequest) GetHost

func (x *HttpRequest) GetHost() string

func (*HttpRequest) GetMethod

func (x *HttpRequest) GetMethod() string

func (*HttpRequest) GetPath

func (x *HttpRequest) GetPath() string

func (*HttpRequest) GetResponseTime

func (x *HttpRequest) GetResponseTime() float64

func (*HttpRequest) GetStatus

func (x *HttpRequest) GetStatus() int64

func (*HttpRequest) ProtoMessage

func (*HttpRequest) ProtoMessage()

func (*HttpRequest) ProtoReflect

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

func (*HttpRequest) Reset

func (x *HttpRequest) Reset()

func (*HttpRequest) String

func (x *HttpRequest) String() string

type Metrics

type Metrics struct {

	// The version of the format used to report the metrics.
	MetricsVersion int64 `protobuf:"varint,1,opt,name=metrics_version,json=metricsVersion,proto3" json:"metrics_version,omitempty"`
	// A UNIX timestamp for the time when the command was executed.
	// TODO(ehmaldonado): Consider converting to google.protobuf.Timestamp.
	Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The command that was executed. Must be one of the |knownCommands| defined
	// in metrics/constants.go.
	Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
	// The arguments passed to the command. All arguments must be |knownArguments|
	// as defined in metrics/constants.go.
	Arguments []string `protobuf:"bytes,4,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// The runtime of the command in seconds.
	// TODO(ehmaldonado): Consider converting to google.protobuf.Duration.
	ExecutionTime float64 `protobuf:"fixed64,5,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"`
	// The exit code of the command.
	ExitCode int64 `protobuf:"varint,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// Information on the sub-commands executed by this command.
	SubCommands []*SubCommand `protobuf:"bytes,7,rep,name=sub_commands,json=subCommands,proto3" json:"sub_commands,omitempty"`
	// Information on the HTTP requests made by this command.
	HttpRequests []*HttpRequest `protobuf:"bytes,8,rep,name=http_requests,json=httpRequests,proto3" json:"http_requests,omitempty"`
	// The URLs of the current project(s).
	// e.g. The project to which git-cl uploads a change; the projects gclient is
	// configured to manage; etc.
	// Must be one of the |knownProjectURLs| as defined in metrics/constants.go.
	ProjectUrls []string `protobuf:"bytes,9,rep,name=project_urls,json=projectUrls,proto3" json:"project_urls,omitempty"`
	// A UNIX timestamp for the time depot_tools was last modified.
	// TODO(ehmaldonado): Consider converting to google.protobuf.Timestamp.
	DepotToolsAge float64 `protobuf:"fixed64,10,opt,name=depot_tools_age,json=depotToolsAge,proto3" json:"depot_tools_age,omitempty"`
	// The arch the command was executed on. Must be one of the |knownHostArchs|
	// as defined in metrics/constants.go.
	// e.g. x86, arm
	HostArch string `protobuf:"bytes,11,opt,name=host_arch,json=hostArch,proto3" json:"host_arch,omitempty"`
	// The OS the command was executed on. Must be one of the |knownOSs| as
	// defined in metrics/constants.go.
	HostOs string `protobuf:"bytes,12,opt,name=host_os,json=hostOs,proto3" json:"host_os,omitempty"`
	// The python version the command was executed with. Must match the
	// |pythonVersionRegex| defined in metrics/constants.go.
	PythonVersion string `protobuf:"bytes,13,opt,name=python_version,json=pythonVersion,proto3" json:"python_version,omitempty"`
	// The git version the command used. Must match the |gitVersionRegex| defined
	// in metrics/constants.go.
	GitVersion string `protobuf:"bytes,14,opt,name=git_version,json=gitVersion,proto3" json:"git_version,omitempty"`
	// Metrics specific to commands run on bots.
	BotMetrics *BotMetrics `protobuf:"bytes,15,opt,name=bot_metrics,json=botMetrics,proto3" json:"bot_metrics,omitempty"`
	// The dependencies listed in DEPS that were synced by this command.
	GitDeps []*GitDependency `protobuf:"bytes,16,rep,name=git_deps,json=gitDeps,proto3" json:"git_deps,omitempty"`
	// The hooks listed in DEPS that were executed by this command.
	Hooks []*Hook `protobuf:"bytes,17,rep,name=hooks,proto3" json:"hooks,omitempty"`
	// contains filtered or unexported fields
}

Metrics stores information for a depot_tools command's execution.

func (*Metrics) Descriptor deprecated

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

Deprecated: Use Metrics.ProtoReflect.Descriptor instead.

func (*Metrics) GetArguments

func (x *Metrics) GetArguments() []string

func (*Metrics) GetBotMetrics

func (x *Metrics) GetBotMetrics() *BotMetrics

func (*Metrics) GetCommand

func (x *Metrics) GetCommand() string

func (*Metrics) GetDepotToolsAge

func (x *Metrics) GetDepotToolsAge() float64

func (*Metrics) GetExecutionTime

func (x *Metrics) GetExecutionTime() float64

func (*Metrics) GetExitCode

func (x *Metrics) GetExitCode() int64

func (*Metrics) GetGitDeps

func (x *Metrics) GetGitDeps() []*GitDependency

func (*Metrics) GetGitVersion

func (x *Metrics) GetGitVersion() string

func (*Metrics) GetHooks

func (x *Metrics) GetHooks() []*Hook

func (*Metrics) GetHostArch

func (x *Metrics) GetHostArch() string

func (*Metrics) GetHostOs

func (x *Metrics) GetHostOs() string

func (*Metrics) GetHttpRequests

func (x *Metrics) GetHttpRequests() []*HttpRequest

func (*Metrics) GetMetricsVersion

func (x *Metrics) GetMetricsVersion() int64

func (*Metrics) GetProjectUrls

func (x *Metrics) GetProjectUrls() []string

func (*Metrics) GetPythonVersion

func (x *Metrics) GetPythonVersion() string

func (*Metrics) GetSubCommands

func (x *Metrics) GetSubCommands() []*SubCommand

func (*Metrics) GetTimestamp

func (x *Metrics) GetTimestamp() int64

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) ProtoReflect

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

func (*Metrics) Reset

func (x *Metrics) Reset()

func (*Metrics) String

func (x *Metrics) String() string

type SubCommand

type SubCommand struct {

	// The sub-command that was executed. Must be one of the |knownSubCommands| in
	// metrics/constans.go.
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// The arguments passed to the sub-command. All arguments must be
	// |knownSubCommandArguments| as defined in metrics/constants.go.
	Arguments []string `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// The runtime of the sub-command runtime in seconds.
	// TODO(ehmaldonado): Consider converting to google.protobuf.Duration.
	ExecutionTime float64 `protobuf:"fixed64,3,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"`
	// The exit code of the sub-command.
	ExitCode int64 `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// contains filtered or unexported fields
}

SubCommand stores information on the sub-commands executed by the command.

func (*SubCommand) Descriptor deprecated

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

Deprecated: Use SubCommand.ProtoReflect.Descriptor instead.

func (*SubCommand) GetArguments

func (x *SubCommand) GetArguments() []string

func (*SubCommand) GetCommand

func (x *SubCommand) GetCommand() string

func (*SubCommand) GetExecutionTime

func (x *SubCommand) GetExecutionTime() float64

func (*SubCommand) GetExitCode

func (x *SubCommand) GetExitCode() int64

func (*SubCommand) ProtoMessage

func (*SubCommand) ProtoMessage()

func (*SubCommand) ProtoReflect

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

func (*SubCommand) Reset

func (x *SubCommand) Reset()

func (*SubCommand) String

func (x *SubCommand) String() string

type SyncStatus

type SyncStatus int32
const (
	SyncStatus_UNSPECIFIED         SyncStatus = 0
	SyncStatus_SYNC_STATUS_FAILURE SyncStatus = 1
	SyncStatus_SYNC_STATUS_SUCCESS SyncStatus = 2
	SyncStatus_SYNC_STATUS_NO_OP   SyncStatus = 3
)

func (SyncStatus) Descriptor

func (SyncStatus) Descriptor() protoreflect.EnumDescriptor

func (SyncStatus) Enum

func (x SyncStatus) Enum() *SyncStatus

func (SyncStatus) EnumDescriptor deprecated

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

Deprecated: Use SyncStatus.Descriptor instead.

func (SyncStatus) Number

func (x SyncStatus) Number() protoreflect.EnumNumber

func (SyncStatus) String

func (x SyncStatus) String() string

func (SyncStatus) Type

Jump to

Keyboard shortcuts

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