platform

package
v0.0.0-...-9474aff Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package platform provides the BootPerfService, PerfettoTraceBasedMetricsService and UpstartService.

Index

Constants

This section is empty.

Variables

View Source
var File_boot_perf_service_proto protoreflect.FileDescriptor
View Source
var File_perfetto_trace_based_metrics_service_proto protoreflect.FileDescriptor
View Source
var File_upstart_service_proto protoreflect.FileDescriptor

Functions

func RegisterBootPerfServiceServer

func RegisterBootPerfServiceServer(s *grpc.Server, srv BootPerfServiceServer)

func RegisterPerfettoTraceBasedMetricsServiceServer

func RegisterPerfettoTraceBasedMetricsServiceServer(s *grpc.Server, srv PerfettoTraceBasedMetricsServiceServer)

func RegisterUpstartServiceServer

func RegisterUpstartServiceServer(s *grpc.Server, srv UpstartServiceServer)

Types

type Arg

type Arg struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Arg) Descriptor deprecated

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

Deprecated: Use Arg.ProtoReflect.Descriptor instead.

func (*Arg) GetKey

func (x *Arg) GetKey() string

func (*Arg) GetValue

func (x *Arg) GetValue() string

func (*Arg) ProtoMessage

func (*Arg) ProtoMessage()

func (*Arg) ProtoReflect

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

func (*Arg) Reset

func (x *Arg) Reset()

func (*Arg) String

func (x *Arg) String() string

type BootPerfServiceClient

type BootPerfServiceClient interface {
	//  Enables bootchart collection for next system boot.
	EnableBootchart(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	// Disables bootchart collection for next system boot.
	DisableBootchart(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	// Collects boot perf metrics from the device.
	GetBootPerfMetrics(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetBootPerfMetricsResponse, error)
	// Saves boot perf raw data and other files like console-ramoops for debugging.
	GetBootPerfRawData(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetBootPerfRawDataResponse, error)
}

BootPerfServiceClient is the client API for BootPerfService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type BootPerfServiceServer

type BootPerfServiceServer interface {
	//  Enables bootchart collection for next system boot.
	EnableBootchart(context.Context, *empty.Empty) (*empty.Empty, error)
	// Disables bootchart collection for next system boot.
	DisableBootchart(context.Context, *empty.Empty) (*empty.Empty, error)
	// Collects boot perf metrics from the device.
	GetBootPerfMetrics(context.Context, *empty.Empty) (*GetBootPerfMetricsResponse, error)
	// Saves boot perf raw data and other files like console-ramoops for debugging.
	GetBootPerfRawData(context.Context, *empty.Empty) (*GetBootPerfRawDataResponse, error)
}

BootPerfServiceServer is the server API for BootPerfService service.

type CheckJobRequest

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

func (*CheckJobRequest) Descriptor deprecated

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

Deprecated: Use CheckJobRequest.ProtoReflect.Descriptor instead.

func (*CheckJobRequest) GetJobName

func (x *CheckJobRequest) GetJobName() string

func (*CheckJobRequest) ProtoMessage

func (*CheckJobRequest) ProtoMessage()

func (*CheckJobRequest) ProtoReflect

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

func (*CheckJobRequest) Reset

func (x *CheckJobRequest) Reset()

func (*CheckJobRequest) String

func (x *CheckJobRequest) String() string

type DisableJobRequest

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

func (*DisableJobRequest) Descriptor deprecated

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

Deprecated: Use DisableJobRequest.ProtoReflect.Descriptor instead.

func (*DisableJobRequest) GetJobName

func (x *DisableJobRequest) GetJobName() string

func (*DisableJobRequest) ProtoMessage

func (*DisableJobRequest) ProtoMessage()

func (*DisableJobRequest) ProtoReflect

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

func (*DisableJobRequest) Reset

func (x *DisableJobRequest) Reset()

func (*DisableJobRequest) String

func (x *DisableJobRequest) String() string

type EnableJobRequest

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

func (*EnableJobRequest) Descriptor deprecated

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

Deprecated: Use EnableJobRequest.ProtoReflect.Descriptor instead.

func (*EnableJobRequest) GetJobName

func (x *EnableJobRequest) GetJobName() string

func (*EnableJobRequest) ProtoMessage

func (*EnableJobRequest) ProtoMessage()

func (*EnableJobRequest) ProtoReflect

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

func (*EnableJobRequest) Reset

func (x *EnableJobRequest) Reset()

func (*EnableJobRequest) String

func (x *EnableJobRequest) String() string

type GeneratePerfettoTraceRequest

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

func (*GeneratePerfettoTraceRequest) Descriptor deprecated

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

Deprecated: Use GeneratePerfettoTraceRequest.ProtoReflect.Descriptor instead.

func (*GeneratePerfettoTraceRequest) GetConfig

func (x *GeneratePerfettoTraceRequest) GetConfig() string

func (*GeneratePerfettoTraceRequest) ProtoMessage

func (*GeneratePerfettoTraceRequest) ProtoMessage()

func (*GeneratePerfettoTraceRequest) ProtoReflect

func (*GeneratePerfettoTraceRequest) Reset

func (x *GeneratePerfettoTraceRequest) Reset()

func (*GeneratePerfettoTraceRequest) String

type GeneratePerfettoTraceResponse

type GeneratePerfettoTraceResponse struct {
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*GeneratePerfettoTraceResponse) Descriptor deprecated

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

Deprecated: Use GeneratePerfettoTraceResponse.ProtoReflect.Descriptor instead.

func (*GeneratePerfettoTraceResponse) GetResult

func (x *GeneratePerfettoTraceResponse) GetResult() []byte

func (*GeneratePerfettoTraceResponse) ProtoMessage

func (*GeneratePerfettoTraceResponse) ProtoMessage()

func (*GeneratePerfettoTraceResponse) ProtoReflect

func (*GeneratePerfettoTraceResponse) Reset

func (x *GeneratePerfettoTraceResponse) Reset()

func (*GeneratePerfettoTraceResponse) String

type GetBootPerfMetricsResponse

type GetBootPerfMetricsResponse struct {

	// Key: metric name. Value: boot metric. Example: "seconds_power_on_to_login" => 10.0.
	Metrics map[string]float64 `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetBootPerfMetricsResponse) Descriptor deprecated

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

Deprecated: Use GetBootPerfMetricsResponse.ProtoReflect.Descriptor instead.

func (*GetBootPerfMetricsResponse) GetMetrics

func (x *GetBootPerfMetricsResponse) GetMetrics() map[string]float64

func (*GetBootPerfMetricsResponse) ProtoMessage

func (*GetBootPerfMetricsResponse) ProtoMessage()

func (*GetBootPerfMetricsResponse) ProtoReflect

func (*GetBootPerfMetricsResponse) Reset

func (x *GetBootPerfMetricsResponse) Reset()

func (*GetBootPerfMetricsResponse) String

func (x *GetBootPerfMetricsResponse) String() string

type GetBootPerfRawDataResponse

type GetBootPerfRawDataResponse struct {

	// Key: file name. Value: file content. Example: "uptime-chrome-exec" => "3.92 24.14"
	RawData map[string][]byte `` /* 170-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetBootPerfRawDataResponse) Descriptor deprecated

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

Deprecated: Use GetBootPerfRawDataResponse.ProtoReflect.Descriptor instead.

func (*GetBootPerfRawDataResponse) GetRawData

func (x *GetBootPerfRawDataResponse) GetRawData() map[string][]byte

func (*GetBootPerfRawDataResponse) ProtoMessage

func (*GetBootPerfRawDataResponse) ProtoMessage()

func (*GetBootPerfRawDataResponse) ProtoReflect

func (*GetBootPerfRawDataResponse) Reset

func (x *GetBootPerfRawDataResponse) Reset()

func (*GetBootPerfRawDataResponse) String

func (x *GetBootPerfRawDataResponse) String() string

type IsJobEnabledRequest

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

func (*IsJobEnabledRequest) Descriptor deprecated

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

Deprecated: Use IsJobEnabledRequest.ProtoReflect.Descriptor instead.

func (*IsJobEnabledRequest) GetJobName

func (x *IsJobEnabledRequest) GetJobName() string

func (*IsJobEnabledRequest) ProtoMessage

func (*IsJobEnabledRequest) ProtoMessage()

func (*IsJobEnabledRequest) ProtoReflect

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

func (*IsJobEnabledRequest) Reset

func (x *IsJobEnabledRequest) Reset()

func (*IsJobEnabledRequest) String

func (x *IsJobEnabledRequest) String() string

type IsJobEnabledResponse

type IsJobEnabledResponse struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*IsJobEnabledResponse) Descriptor deprecated

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

Deprecated: Use IsJobEnabledResponse.ProtoReflect.Descriptor instead.

func (*IsJobEnabledResponse) GetEnabled

func (x *IsJobEnabledResponse) GetEnabled() bool

func (*IsJobEnabledResponse) ProtoMessage

func (*IsJobEnabledResponse) ProtoMessage()

func (*IsJobEnabledResponse) ProtoReflect

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

func (*IsJobEnabledResponse) Reset

func (x *IsJobEnabledResponse) Reset()

func (*IsJobEnabledResponse) String

func (x *IsJobEnabledResponse) String() string

type JobStatusRequest

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

func (*JobStatusRequest) Descriptor deprecated

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

Deprecated: Use JobStatusRequest.ProtoReflect.Descriptor instead.

func (*JobStatusRequest) GetJobName

func (x *JobStatusRequest) GetJobName() string

func (*JobStatusRequest) ProtoMessage

func (*JobStatusRequest) ProtoMessage()

func (*JobStatusRequest) ProtoReflect

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

func (*JobStatusRequest) Reset

func (x *JobStatusRequest) Reset()

func (*JobStatusRequest) String

func (x *JobStatusRequest) String() string

type JobStatusResponse

type JobStatusResponse struct {
	Goal  string `protobuf:"bytes,1,opt,name=goal,proto3" json:"goal,omitempty"`
	State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	Pid   int32  `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
	// contains filtered or unexported fields
}

Definitions of "goal" and "state" described in https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/HEAD/src/chromiumos/tast/local/upstart/upstart.go

func (*JobStatusResponse) Descriptor deprecated

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

Deprecated: Use JobStatusResponse.ProtoReflect.Descriptor instead.

func (*JobStatusResponse) GetGoal

func (x *JobStatusResponse) GetGoal() string

func (*JobStatusResponse) GetPid

func (x *JobStatusResponse) GetPid() int32

func (*JobStatusResponse) GetState

func (x *JobStatusResponse) GetState() string

func (*JobStatusResponse) ProtoMessage

func (*JobStatusResponse) ProtoMessage()

func (*JobStatusResponse) ProtoReflect

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

func (*JobStatusResponse) Reset

func (x *JobStatusResponse) Reset()

func (*JobStatusResponse) String

func (x *JobStatusResponse) String() string

type PerfettoTraceBasedMetricsServiceClient

type PerfettoTraceBasedMetricsServiceClient interface {
	// Use perfetto to generate trace and send back to the host.
	GeneratePerfettoTrace(ctx context.Context, in *GeneratePerfettoTraceRequest, opts ...grpc.CallOption) (PerfettoTraceBasedMetricsService_GeneratePerfettoTraceClient, error)
}

PerfettoTraceBasedMetricsServiceClient is the client API for PerfettoTraceBasedMetricsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type PerfettoTraceBasedMetricsServiceServer

type PerfettoTraceBasedMetricsServiceServer interface {
	// Use perfetto to generate trace and send back to the host.
	GeneratePerfettoTrace(*GeneratePerfettoTraceRequest, PerfettoTraceBasedMetricsService_GeneratePerfettoTraceServer) error
}

PerfettoTraceBasedMetricsServiceServer is the server API for PerfettoTraceBasedMetricsService service.

type PerfettoTraceBasedMetricsService_GeneratePerfettoTraceClient

type PerfettoTraceBasedMetricsService_GeneratePerfettoTraceClient interface {
	Recv() (*GeneratePerfettoTraceResponse, error)
	grpc.ClientStream
}

type PerfettoTraceBasedMetricsService_GeneratePerfettoTraceServer

type PerfettoTraceBasedMetricsService_GeneratePerfettoTraceServer interface {
	Send(*GeneratePerfettoTraceResponse) error
	grpc.ServerStream
}

type StartJobRequest

type StartJobRequest struct {
	JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
	Args    []*Arg `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*StartJobRequest) Descriptor deprecated

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

Deprecated: Use StartJobRequest.ProtoReflect.Descriptor instead.

func (*StartJobRequest) GetArgs

func (x *StartJobRequest) GetArgs() []*Arg

func (*StartJobRequest) GetJobName

func (x *StartJobRequest) GetJobName() string

func (*StartJobRequest) ProtoMessage

func (*StartJobRequest) ProtoMessage()

func (*StartJobRequest) ProtoReflect

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

func (*StartJobRequest) Reset

func (x *StartJobRequest) Reset()

func (*StartJobRequest) String

func (x *StartJobRequest) String() string

type StopJobRequest

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

func (*StopJobRequest) Descriptor deprecated

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

Deprecated: Use StopJobRequest.ProtoReflect.Descriptor instead.

func (*StopJobRequest) GetJobName

func (x *StopJobRequest) GetJobName() string

func (*StopJobRequest) ProtoMessage

func (*StopJobRequest) ProtoMessage()

func (*StopJobRequest) ProtoReflect

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

func (*StopJobRequest) Reset

func (x *StopJobRequest) Reset()

func (*StopJobRequest) String

func (x *StopJobRequest) String() string

type UnimplementedBootPerfServiceServer

type UnimplementedBootPerfServiceServer struct {
}

UnimplementedBootPerfServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBootPerfServiceServer) DisableBootchart

func (*UnimplementedBootPerfServiceServer) EnableBootchart

func (*UnimplementedBootPerfServiceServer) GetBootPerfMetrics

func (*UnimplementedBootPerfServiceServer) GetBootPerfRawData

type UnimplementedPerfettoTraceBasedMetricsServiceServer

type UnimplementedPerfettoTraceBasedMetricsServiceServer struct {
}

UnimplementedPerfettoTraceBasedMetricsServiceServer can be embedded to have forward compatible implementations.

type UnimplementedUpstartServiceServer

type UnimplementedUpstartServiceServer struct {
}

UnimplementedUpstartServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUpstartServiceServer) CheckJob

func (*UnimplementedUpstartServiceServer) DisableJob

func (*UnimplementedUpstartServiceServer) EnableJob

func (*UnimplementedUpstartServiceServer) IsJobEnabled

func (*UnimplementedUpstartServiceServer) JobStatus

func (*UnimplementedUpstartServiceServer) StartJob

func (*UnimplementedUpstartServiceServer) StopJob

type UpstartServiceClient

type UpstartServiceClient interface {
	// Check that the given upstart job is running.
	CheckJob(ctx context.Context, in *CheckJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// JobStatus returns the current status of job.
	JobStatus(ctx context.Context, in *JobStatusRequest, opts ...grpc.CallOption) (*JobStatusResponse, error)
	// StartJob starts job. If it is already running, this returns an error.
	StartJob(ctx context.Context, in *StartJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// StopJob stops job. If it is not currently running, this is a no-op.
	StopJob(ctx context.Context, in *StopJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// EnableJob enables an upstart job that was previously disabled.
	EnableJob(ctx context.Context, in *EnableJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// DisableJob disables an upstart job, which takes effect on the next reboot.
	DisableJob(ctx context.Context, in *DisableJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// IsJobEnabled checks if the given upstart job is enabled.
	IsJobEnabled(ctx context.Context, in *IsJobEnabledRequest, opts ...grpc.CallOption) (*IsJobEnabledResponse, error)
}

UpstartServiceClient is the client API for UpstartService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type UpstartServiceServer

type UpstartServiceServer interface {
	// Check that the given upstart job is running.
	CheckJob(context.Context, *CheckJobRequest) (*empty.Empty, error)
	// JobStatus returns the current status of job.
	JobStatus(context.Context, *JobStatusRequest) (*JobStatusResponse, error)
	// StartJob starts job. If it is already running, this returns an error.
	StartJob(context.Context, *StartJobRequest) (*empty.Empty, error)
	// StopJob stops job. If it is not currently running, this is a no-op.
	StopJob(context.Context, *StopJobRequest) (*empty.Empty, error)
	// EnableJob enables an upstart job that was previously disabled.
	EnableJob(context.Context, *EnableJobRequest) (*empty.Empty, error)
	// DisableJob disables an upstart job, which takes effect on the next reboot.
	DisableJob(context.Context, *DisableJobRequest) (*empty.Empty, error)
	// IsJobEnabled checks if the given upstart job is enabled.
	IsJobEnabled(context.Context, *IsJobEnabledRequest) (*IsJobEnabledResponse, error)
}

UpstartServiceServer is the server API for UpstartService service.

Jump to

Keyboard shortcuts

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