grpc_testing
v0.0.0-20170609214715-11d0a25b4919
Documentation
pkg.go.dev ↗Package grpc_testing is a generated protocol buffer package.
It is generated from these files:
control.proto messages.proto payloads.proto services.proto stats.proto
It has these top-level messages:
PoissonParams UniformParams DeterministicParams ParetoParams ClosedLoopParams LoadParams SecurityParams ClientConfig ClientStatus Mark ClientArgs ServerConfig ServerArgs ServerStatus CoreRequest CoreResponse Void Scenario Scenarios Payload EchoStatus SimpleRequest SimpleResponse StreamingInputCallRequest StreamingInputCallResponse ResponseParameters StreamingOutputCallRequest StreamingOutputCallResponse ReconnectParams ReconnectInfo ByteBufferParams SimpleProtoParams ComplexProtoParams PayloadConfig ServerStats HistogramParams HistogramData ClientStats
Variables
ClientType_name
var ClientType_name = map[int32]string{
0: "SYNC_CLIENT",
1: "ASYNC_CLIENT",
}
ClientType_value
var ClientType_value = map[string]int32{
"SYNC_CLIENT": 0,
"ASYNC_CLIENT": 1,
}
CompressionType_name
var CompressionType_name = map[int32]string{
0: "NONE",
1: "GZIP",
2: "DEFLATE",
}
CompressionType_value
var CompressionType_value = map[string]int32{
"NONE": 0,
"GZIP": 1,
"DEFLATE": 2,
}
PayloadType_name
var PayloadType_name = map[int32]string{
0: "COMPRESSABLE",
1: "UNCOMPRESSABLE",
2: "RANDOM",
}
PayloadType_value
var PayloadType_value = map[string]int32{
"COMPRESSABLE": 0,
"UNCOMPRESSABLE": 1,
"RANDOM": 2,
}
RpcType_name
var RpcType_name = map[int32]string{
0: "UNARY",
1: "STREAMING",
}
RpcType_value
var RpcType_value = map[string]int32{
"UNARY": 0,
"STREAMING": 1,
}
ServerType_name
var ServerType_name = map[int32]string{
0: "SYNC_SERVER",
1: "ASYNC_SERVER",
2: "ASYNC_GENERIC_SERVER",
}
ServerType_value
var ServerType_value = map[string]int32{
"SYNC_SERVER": 0,
"ASYNC_SERVER": 1,
"ASYNC_GENERIC_SERVER": 2,
}
Functions
RegisterBenchmarkServiceServer
func RegisterBenchmarkServiceServer(s *grpc.Server, srv BenchmarkServiceServer)
RegisterWorkerServiceServer
func RegisterWorkerServiceServer(s *grpc.Server, srv WorkerServiceServer)
Types
BenchmarkServiceClient
type BenchmarkServiceClient interface {
// One request followed by one response.
// The server returns the client payload as-is.
UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
// One request followed by one response.
// The server returns the client payload as-is.
StreamingCall(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingCallClient, error)
}
NewBenchmarkServiceClient
func NewBenchmarkServiceClient(cc *grpc.ClientConn) BenchmarkServiceClient
BenchmarkServiceServer
type BenchmarkServiceServer interface {
// One request followed by one response.
// The server returns the client payload as-is.
UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
// One request followed by one response.
// The server returns the client payload as-is.
StreamingCall(BenchmarkService_StreamingCallServer) error
}
BenchmarkService_StreamingCallClient
type BenchmarkService_StreamingCallClient interface {
Send(*SimpleRequest) error
Recv() (*SimpleResponse, error)
grpc.ClientStream
}
BenchmarkService_StreamingCallServer
type BenchmarkService_StreamingCallServer interface {
Send(*SimpleResponse) error
Recv() (*SimpleRequest, error)
grpc.ServerStream
}
ByteBufferParams
type ByteBufferParams struct {
ReqSize int32 `protobuf:"varint,1,opt,name=req_size,json=reqSize" json:"req_size,omitempty"`
RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize" json:"resp_size,omitempty"`
}
ByteBufferParams.Descriptor
func (*ByteBufferParams) Descriptor() ([]byte, []int)
ByteBufferParams.ProtoMessage
func (*ByteBufferParams) ProtoMessage()
ByteBufferParams.Reset
func (m *ByteBufferParams) Reset()
ByteBufferParams.String
func (m *ByteBufferParams) String() string
ClientArgs
type ClientArgs struct {
// Types that are valid to be assigned to Argtype:
// *ClientArgs_Setup
// *ClientArgs_Mark
Argtype isClientArgs_Argtype `protobuf_oneof:"argtype"`
}
ClientArgs.Descriptor
func (*ClientArgs) Descriptor() ([]byte, []int)
ClientArgs.GetArgtype
func (m *ClientArgs) GetArgtype() isClientArgs_Argtype
ClientArgs.GetMark
func (m *ClientArgs) GetMark() *Mark
ClientArgs.GetSetup
func (m *ClientArgs) GetSetup() *ClientConfig
ClientArgs.ProtoMessage
func (*ClientArgs) ProtoMessage()
ClientArgs.Reset
func (m *ClientArgs) Reset()
ClientArgs.String
func (m *ClientArgs) String() string
ClientArgs.XXX_OneofFuncs
func (*ClientArgs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
ClientArgs_Mark
type ClientArgs_Mark struct {
Mark *Mark `protobuf:"bytes,2,opt,name=mark,oneof"`
}
ClientArgs_Setup
type ClientArgs_Setup struct {
Setup *ClientConfig `protobuf:"bytes,1,opt,name=setup,oneof"`
}
ClientConfig
type ClientConfig struct {
// List of targets to connect to. At least one target needs to be specified.
ServerTargets []string `protobuf:"bytes,1,rep,name=server_targets,json=serverTargets" json:"server_targets,omitempty"`
ClientType ClientType `protobuf:"varint,2,opt,name=client_type,json=clientType,enum=grpc.testing.ClientType" json:"client_type,omitempty"`
SecurityParams *SecurityParams `protobuf:"bytes,3,opt,name=security_params,json=securityParams" json:"security_params,omitempty"`
// How many concurrent RPCs to start for each channel.
// For synchronous client, use a separate thread for each outstanding RPC.
OutstandingRpcsPerChannel int32 `protobuf:"varint,4,opt,name=outstanding_rpcs_per_channel,json=outstandingRpcsPerChannel" json:"outstanding_rpcs_per_channel,omitempty"`
// Number of independent client channels to create.
// i-th channel will connect to server_target[i % server_targets.size()]
ClientChannels int32 `protobuf:"varint,5,opt,name=client_channels,json=clientChannels" json:"client_channels,omitempty"`
// Only for async client. Number of threads to use to start/manage RPCs.
AsyncClientThreads int32 `protobuf:"varint,7,opt,name=async_client_threads,json=asyncClientThreads" json:"async_client_threads,omitempty"`
RpcType RpcType `protobuf:"varint,8,opt,name=rpc_type,json=rpcType,enum=grpc.testing.RpcType" json:"rpc_type,omitempty"`
// The requested load for the entire client (aggregated over all the threads).
LoadParams *LoadParams `protobuf:"bytes,10,opt,name=load_params,json=loadParams" json:"load_params,omitempty"`
PayloadConfig *PayloadConfig `protobuf:"bytes,11,opt,name=payload_config,json=payloadConfig" json:"payload_config,omitempty"`
HistogramParams *HistogramParams `protobuf:"bytes,12,opt,name=histogram_params,json=histogramParams" json:"histogram_params,omitempty"`
// Specify the cores we should run the client on, if desired
CoreList []int32 `protobuf:"varint,13,rep,name=core_list,json=coreList" json:"core_list,omitempty"`
CoreLimit int32 `protobuf:"varint,14,opt,name=core_limit,json=coreLimit" json:"core_limit,omitempty"`
}
ClientConfig.Descriptor
func (*ClientConfig) Descriptor() ([]byte, []int)
ClientConfig.GetHistogramParams
func (m *ClientConfig) GetHistogramParams() *HistogramParams
ClientConfig.GetLoadParams
func (m *ClientConfig) GetLoadParams() *LoadParams
ClientConfig.GetPayloadConfig
func (m *ClientConfig) GetPayloadConfig() *PayloadConfig
ClientConfig.GetSecurityParams
func (m *ClientConfig) GetSecurityParams() *SecurityParams
ClientConfig.ProtoMessage
func (*ClientConfig) ProtoMessage()
ClientConfig.Reset
func (m *ClientConfig) Reset()
ClientConfig.String
func (m *ClientConfig) String() string
ClientStats
type ClientStats struct {
// Latency histogram. Data points are in nanoseconds.
Latencies *HistogramData `protobuf:"bytes,1,opt,name=latencies" json:"latencies,omitempty"`
// See ServerStats for details.
TimeElapsed float64 `protobuf:"fixed64,2,opt,name=time_elapsed,json=timeElapsed" json:"time_elapsed,omitempty"`
TimeUser float64 `protobuf:"fixed64,3,opt,name=time_user,json=timeUser" json:"time_user,omitempty"`
TimeSystem float64 `protobuf:"fixed64,4,opt,name=time_system,json=timeSystem" json:"time_system,omitempty"`
}
ClientStats.Descriptor
func (*ClientStats) Descriptor() ([]byte, []int)
ClientStats.GetLatencies
func (m *ClientStats) GetLatencies() *HistogramData
ClientStats.ProtoMessage
func (*ClientStats) ProtoMessage()
ClientStats.Reset
func (m *ClientStats) Reset()
ClientStats.String
func (m *ClientStats) String() string
ClientStatus
type ClientStatus struct {
Stats *ClientStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
}
ClientStatus.Descriptor
func (*ClientStatus) Descriptor() ([]byte, []int)
ClientStatus.GetStats
func (m *ClientStatus) GetStats() *ClientStats
ClientStatus.ProtoMessage
func (*ClientStatus) ProtoMessage()
ClientStatus.Reset
func (m *ClientStatus) Reset()
ClientStatus.String
func (m *ClientStatus) String() string
ClientType
type ClientType int32
ClientType_SYNC_CLIENT (2 declarations)
const ( ClientType_SYNC_CLIENT ClientType = 0 ClientType_ASYNC_CLIENT ClientType = 1 )
ClientType.EnumDescriptor
func (ClientType) EnumDescriptor() ([]byte, []int)
ClientType.String
func (x ClientType) String() string
ClosedLoopParams
type ClosedLoopParams struct {
}
Once an RPC finishes, immediately start a new one. No configuration parameters needed.
ClosedLoopParams.Descriptor
func (*ClosedLoopParams) Descriptor() ([]byte, []int)
ClosedLoopParams.ProtoMessage
func (*ClosedLoopParams) ProtoMessage()
ClosedLoopParams.Reset
func (m *ClosedLoopParams) Reset()
ClosedLoopParams.String
func (m *ClosedLoopParams) String() string
ComplexProtoParams
type ComplexProtoParams struct {
}
ComplexProtoParams.Descriptor
func (*ComplexProtoParams) Descriptor() ([]byte, []int)
ComplexProtoParams.ProtoMessage
func (*ComplexProtoParams) ProtoMessage()
ComplexProtoParams.Reset
func (m *ComplexProtoParams) Reset()
ComplexProtoParams.String
func (m *ComplexProtoParams) String() string
CompressionType
type CompressionType int32
Compression algorithms
CompressionType_NONE (3 declarations)
const ( // No compression CompressionType_NONE CompressionType = 0 CompressionType_GZIP CompressionType = 1 CompressionType_DEFLATE CompressionType = 2 )
CompressionType.EnumDescriptor
func (CompressionType) EnumDescriptor() ([]byte, []int)
CompressionType.String
func (x CompressionType) String() string
CoreRequest
type CoreRequest struct {
}
CoreRequest.Descriptor
func (*CoreRequest) Descriptor() ([]byte, []int)
CoreRequest.ProtoMessage
func (*CoreRequest) ProtoMessage()
CoreRequest.Reset
func (m *CoreRequest) Reset()
CoreRequest.String
func (m *CoreRequest) String() string
CoreResponse
type CoreResponse struct {
// Number of cores available on the server
Cores int32 `protobuf:"varint,1,opt,name=cores" json:"cores,omitempty"`
}
CoreResponse.Descriptor
func (*CoreResponse) Descriptor() ([]byte, []int)
CoreResponse.ProtoMessage
func (*CoreResponse) ProtoMessage()
CoreResponse.Reset
func (m *CoreResponse) Reset()
CoreResponse.String
func (m *CoreResponse) String() string
DeterministicParams
type DeterministicParams struct {
OfferedLoad float64 `protobuf:"fixed64,1,opt,name=offered_load,json=offeredLoad" json:"offered_load,omitempty"`
}
DeterministicParams.Descriptor
func (*DeterministicParams) Descriptor() ([]byte, []int)
DeterministicParams.ProtoMessage
func (*DeterministicParams) ProtoMessage()
DeterministicParams.Reset
func (m *DeterministicParams) Reset()
DeterministicParams.String
func (m *DeterministicParams) String() string
EchoStatus
type EchoStatus struct {
Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}
A protobuf representation for grpc status. This is used by test clients to specify a status that the server should attempt to return.
EchoStatus.Descriptor
func (*EchoStatus) Descriptor() ([]byte, []int)
EchoStatus.ProtoMessage
func (*EchoStatus) ProtoMessage()
EchoStatus.Reset
func (m *EchoStatus) Reset()
EchoStatus.String
func (m *EchoStatus) String() string
HistogramData
type HistogramData struct {
Bucket []uint32 `protobuf:"varint,1,rep,name=bucket" json:"bucket,omitempty"`
MinSeen float64 `protobuf:"fixed64,2,opt,name=min_seen,json=minSeen" json:"min_seen,omitempty"`
MaxSeen float64 `protobuf:"fixed64,3,opt,name=max_seen,json=maxSeen" json:"max_seen,omitempty"`
Sum float64 `protobuf:"fixed64,4,opt,name=sum" json:"sum,omitempty"`
SumOfSquares float64 `protobuf:"fixed64,5,opt,name=sum_of_squares,json=sumOfSquares" json:"sum_of_squares,omitempty"`
Count float64 `protobuf:"fixed64,6,opt,name=count" json:"count,omitempty"`
}
Histogram data based on grpc/support/histogram.c
HistogramData.Descriptor
func (*HistogramData) Descriptor() ([]byte, []int)
HistogramData.ProtoMessage
func (*HistogramData) ProtoMessage()
HistogramData.Reset
func (m *HistogramData) Reset()
HistogramData.String
func (m *HistogramData) String() string
HistogramParams
type HistogramParams struct {
Resolution float64 `protobuf:"fixed64,1,opt,name=resolution" json:"resolution,omitempty"`
MaxPossible float64 `protobuf:"fixed64,2,opt,name=max_possible,json=maxPossible" json:"max_possible,omitempty"`
}
Histogram params based on grpc/support/histogram.c
HistogramParams.Descriptor
func (*HistogramParams) Descriptor() ([]byte, []int)
HistogramParams.ProtoMessage
func (*HistogramParams) ProtoMessage()
HistogramParams.Reset
func (m *HistogramParams) Reset()
HistogramParams.String
func (m *HistogramParams) String() string
LoadParams
type LoadParams struct {
// Types that are valid to be assigned to Load:
// *LoadParams_ClosedLoop
// *LoadParams_Poisson
// *LoadParams_Uniform
// *LoadParams_Determ
// *LoadParams_Pareto
Load isLoadParams_Load `protobuf_oneof:"load"`
}
LoadParams.Descriptor
func (*LoadParams) Descriptor() ([]byte, []int)
LoadParams.GetClosedLoop
func (m *LoadParams) GetClosedLoop() *ClosedLoopParams
LoadParams.GetDeterm
func (m *LoadParams) GetDeterm() *DeterministicParams
LoadParams.GetLoad
func (m *LoadParams) GetLoad() isLoadParams_Load
LoadParams.GetPareto
func (m *LoadParams) GetPareto() *ParetoParams
LoadParams.GetPoisson
func (m *LoadParams) GetPoisson() *PoissonParams
LoadParams.GetUniform
func (m *LoadParams) GetUniform() *UniformParams
LoadParams.ProtoMessage
func (*LoadParams) ProtoMessage()
LoadParams.Reset
func (m *LoadParams) Reset()
LoadParams.String
func (m *LoadParams) String() string
LoadParams.XXX_OneofFuncs
func (*LoadParams) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
LoadParams_ClosedLoop
type LoadParams_ClosedLoop struct {
ClosedLoop *ClosedLoopParams `protobuf:"bytes,1,opt,name=closed_loop,json=closedLoop,oneof"`
}
LoadParams_Determ
type LoadParams_Determ struct {
Determ *DeterministicParams `protobuf:"bytes,4,opt,name=determ,oneof"`
}
LoadParams_Pareto
type LoadParams_Pareto struct {
Pareto *ParetoParams `protobuf:"bytes,5,opt,name=pareto,oneof"`
}
LoadParams_Poisson
type LoadParams_Poisson struct {
Poisson *PoissonParams `protobuf:"bytes,2,opt,name=poisson,oneof"`
}
LoadParams_Uniform
type LoadParams_Uniform struct {
Uniform *UniformParams `protobuf:"bytes,3,opt,name=uniform,oneof"`
}
Mark
type Mark struct {
// if true, the stats will be reset after taking their snapshot.
Reset_ bool `protobuf:"varint,1,opt,name=reset" json:"reset,omitempty"`
}
Request current stats
Mark.Descriptor
func (*Mark) Descriptor() ([]byte, []int)
Mark.ProtoMessage
func (*Mark) ProtoMessage()
Mark.Reset
func (m *Mark) Reset()
Mark.String
func (m *Mark) String() string
ParetoParams
type ParetoParams struct {
InterarrivalBase float64 `protobuf:"fixed64,1,opt,name=interarrival_base,json=interarrivalBase" json:"interarrival_base,omitempty"`
Alpha float64 `protobuf:"fixed64,2,opt,name=alpha" json:"alpha,omitempty"`
}
ParetoParams.Descriptor
func (*ParetoParams) Descriptor() ([]byte, []int)
ParetoParams.ProtoMessage
func (*ParetoParams) ProtoMessage()
ParetoParams.Reset
func (m *ParetoParams) Reset()
ParetoParams.String
func (m *ParetoParams) String() string
Payload
type Payload struct {
// The type of data in body.
Type PayloadType `protobuf:"varint,1,opt,name=type,enum=grpc.testing.PayloadType" json:"type,omitempty"`
// Primary contents of payload.
Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
}
A block of data, to simply increase gRPC message size.
Payload.Descriptor
func (*Payload) Descriptor() ([]byte, []int)
Payload.ProtoMessage
func (*Payload) ProtoMessage()
Payload.Reset
func (m *Payload) Reset()
Payload.String
func (m *Payload) String() string
PayloadConfig
type PayloadConfig struct {
// Types that are valid to be assigned to Payload:
// *PayloadConfig_BytebufParams
// *PayloadConfig_SimpleParams
// *PayloadConfig_ComplexParams
Payload isPayloadConfig_Payload `protobuf_oneof:"payload"`
}
PayloadConfig.Descriptor
func (*PayloadConfig) Descriptor() ([]byte, []int)
PayloadConfig.GetBytebufParams
func (m *PayloadConfig) GetBytebufParams() *ByteBufferParams
PayloadConfig.GetComplexParams
func (m *PayloadConfig) GetComplexParams() *ComplexProtoParams
PayloadConfig.GetPayload
func (m *PayloadConfig) GetPayload() isPayloadConfig_Payload
PayloadConfig.GetSimpleParams
func (m *PayloadConfig) GetSimpleParams() *SimpleProtoParams
PayloadConfig.ProtoMessage
func (*PayloadConfig) ProtoMessage()
PayloadConfig.Reset
func (m *PayloadConfig) Reset()
PayloadConfig.String
func (m *PayloadConfig) String() string
PayloadConfig.XXX_OneofFuncs
func (*PayloadConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
PayloadConfig_BytebufParams
type PayloadConfig_BytebufParams struct {
BytebufParams *ByteBufferParams `protobuf:"bytes,1,opt,name=bytebuf_params,json=bytebufParams,oneof"`
}
PayloadConfig_ComplexParams
type PayloadConfig_ComplexParams struct {
ComplexParams *ComplexProtoParams `protobuf:"bytes,3,opt,name=complex_params,json=complexParams,oneof"`
}
PayloadConfig_SimpleParams
type PayloadConfig_SimpleParams struct {
SimpleParams *SimpleProtoParams `protobuf:"bytes,2,opt,name=simple_params,json=simpleParams,oneof"`
}
PayloadType
type PayloadType int32
The type of payload that should be returned.
PayloadType_COMPRESSABLE (3 declarations)
const ( // Compressable text format. PayloadType_COMPRESSABLE PayloadType = 0 // Uncompressable binary format. PayloadType_UNCOMPRESSABLE PayloadType = 1 // Randomly chosen from all other formats defined in this enum. PayloadType_RANDOM PayloadType = 2 )
PayloadType.EnumDescriptor
func (PayloadType) EnumDescriptor() ([]byte, []int)
PayloadType.String
func (x PayloadType) String() string
PoissonParams
type PoissonParams struct {
// The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
OfferedLoad float64 `protobuf:"fixed64,1,opt,name=offered_load,json=offeredLoad" json:"offered_load,omitempty"`
}
Parameters of poisson process distribution, which is a good representation of activity coming in from independent identical stationary sources.
PoissonParams.Descriptor
func (*PoissonParams) Descriptor() ([]byte, []int)
PoissonParams.ProtoMessage
func (*PoissonParams) ProtoMessage()
PoissonParams.Reset
func (m *PoissonParams) Reset()
PoissonParams.String
func (m *PoissonParams) String() string
ReconnectInfo
type ReconnectInfo struct {
Passed bool `protobuf:"varint,1,opt,name=passed" json:"passed,omitempty"`
BackoffMs []int32 `protobuf:"varint,2,rep,name=backoff_ms,json=backoffMs" json:"backoff_ms,omitempty"`
}
For reconnect interop test only. Server tells client whether its reconnects are following the spec and the reconnect backoffs it saw.
ReconnectInfo.Descriptor
func (*ReconnectInfo) Descriptor() ([]byte, []int)
ReconnectInfo.ProtoMessage
func (*ReconnectInfo) ProtoMessage()
ReconnectInfo.Reset
func (m *ReconnectInfo) Reset()
ReconnectInfo.String
func (m *ReconnectInfo) String() string
ReconnectParams
type ReconnectParams struct {
MaxReconnectBackoffMs int32 `protobuf:"varint,1,opt,name=max_reconnect_backoff_ms,json=maxReconnectBackoffMs" json:"max_reconnect_backoff_ms,omitempty"`
}
For reconnect interop test only. Client tells server what reconnection parameters it used.
ReconnectParams.Descriptor
func (*ReconnectParams) Descriptor() ([]byte, []int)
ReconnectParams.ProtoMessage
func (*ReconnectParams) ProtoMessage()
ReconnectParams.Reset
func (m *ReconnectParams) Reset()
ReconnectParams.String
func (m *ReconnectParams) String() string
ResponseParameters
type ResponseParameters struct {
// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
Size int32 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
// Desired interval between consecutive responses in the response stream in
// microseconds.
IntervalUs int32 `protobuf:"varint,2,opt,name=interval_us,json=intervalUs" json:"interval_us,omitempty"`
}
Configuration for a particular response.
ResponseParameters.Descriptor
func (*ResponseParameters) Descriptor() ([]byte, []int)
ResponseParameters.ProtoMessage
func (*ResponseParameters) ProtoMessage()
ResponseParameters.Reset
func (m *ResponseParameters) Reset()
ResponseParameters.String
func (m *ResponseParameters) String() string
RpcType
type RpcType int32
RpcType_UNARY (2 declarations)
const ( RpcType_UNARY RpcType = 0 RpcType_STREAMING RpcType = 1 )
RpcType.EnumDescriptor
func (RpcType) EnumDescriptor() ([]byte, []int)
RpcType.String
func (x RpcType) String() string
Scenario
type Scenario struct {
// Human readable name for this scenario
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Client configuration
ClientConfig *ClientConfig `protobuf:"bytes,2,opt,name=client_config,json=clientConfig" json:"client_config,omitempty"`
// Number of clients to start for the test
NumClients int32 `protobuf:"varint,3,opt,name=num_clients,json=numClients" json:"num_clients,omitempty"`
// Server configuration
ServerConfig *ServerConfig `protobuf:"bytes,4,opt,name=server_config,json=serverConfig" json:"server_config,omitempty"`
// Number of servers to start for the test
NumServers int32 `protobuf:"varint,5,opt,name=num_servers,json=numServers" json:"num_servers,omitempty"`
// Warmup period, in seconds
WarmupSeconds int32 `protobuf:"varint,6,opt,name=warmup_seconds,json=warmupSeconds" json:"warmup_seconds,omitempty"`
// Benchmark time, in seconds
BenchmarkSeconds int32 `protobuf:"varint,7,opt,name=benchmark_seconds,json=benchmarkSeconds" json:"benchmark_seconds,omitempty"`
// Number of workers to spawn locally (usually zero)
SpawnLocalWorkerCount int32 `protobuf:"varint,8,opt,name=spawn_local_worker_count,json=spawnLocalWorkerCount" json:"spawn_local_worker_count,omitempty"`
}
A single performance scenario: input to qps_json_driver
Scenario.Descriptor
func (*Scenario) Descriptor() ([]byte, []int)
Scenario.GetClientConfig
func (m *Scenario) GetClientConfig() *ClientConfig
Scenario.GetServerConfig
func (m *Scenario) GetServerConfig() *ServerConfig
Scenario.ProtoMessage
func (*Scenario) ProtoMessage()
Scenario.Reset
func (m *Scenario) Reset()
Scenario.String
func (m *Scenario) String() string
Scenarios
type Scenarios struct {
Scenarios []*Scenario `protobuf:"bytes,1,rep,name=scenarios" json:"scenarios,omitempty"`
}
A set of scenarios to be run with qps_json_driver
Scenarios.Descriptor
func (*Scenarios) Descriptor() ([]byte, []int)
Scenarios.GetScenarios
func (m *Scenarios) GetScenarios() []*Scenario
Scenarios.ProtoMessage
func (*Scenarios) ProtoMessage()
Scenarios.Reset
func (m *Scenarios) Reset()
Scenarios.String
func (m *Scenarios) String() string
SecurityParams
type SecurityParams struct {
UseTestCa bool `protobuf:"varint,1,opt,name=use_test_ca,json=useTestCa" json:"use_test_ca,omitempty"`
ServerHostOverride string `protobuf:"bytes,2,opt,name=server_host_override,json=serverHostOverride" json:"server_host_override,omitempty"`
}
presence of SecurityParams implies use of TLS
SecurityParams.Descriptor
func (*SecurityParams) Descriptor() ([]byte, []int)
SecurityParams.ProtoMessage
func (*SecurityParams) ProtoMessage()
SecurityParams.Reset
func (m *SecurityParams) Reset()
SecurityParams.String
func (m *SecurityParams) String() string
ServerArgs
type ServerArgs struct {
// Types that are valid to be assigned to Argtype:
// *ServerArgs_Setup
// *ServerArgs_Mark
Argtype isServerArgs_Argtype `protobuf_oneof:"argtype"`
}
ServerArgs.Descriptor
func (*ServerArgs) Descriptor() ([]byte, []int)
ServerArgs.GetArgtype
func (m *ServerArgs) GetArgtype() isServerArgs_Argtype
ServerArgs.GetMark
func (m *ServerArgs) GetMark() *Mark
ServerArgs.GetSetup
func (m *ServerArgs) GetSetup() *ServerConfig
ServerArgs.ProtoMessage
func (*ServerArgs) ProtoMessage()
ServerArgs.Reset
func (m *ServerArgs) Reset()
ServerArgs.String
func (m *ServerArgs) String() string
ServerArgs.XXX_OneofFuncs
func (*ServerArgs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
ServerArgs_Mark
type ServerArgs_Mark struct {
Mark *Mark `protobuf:"bytes,2,opt,name=mark,oneof"`
}
ServerArgs_Setup
type ServerArgs_Setup struct {
Setup *ServerConfig `protobuf:"bytes,1,opt,name=setup,oneof"`
}
ServerConfig
type ServerConfig struct {
ServerType ServerType `protobuf:"varint,1,opt,name=server_type,json=serverType,enum=grpc.testing.ServerType" json:"server_type,omitempty"`
SecurityParams *SecurityParams `protobuf:"bytes,2,opt,name=security_params,json=securityParams" json:"security_params,omitempty"`
// Port on which to listen. Zero means pick unused port.
Port int32 `protobuf:"varint,4,opt,name=port" json:"port,omitempty"`
// Only for async server. Number of threads used to serve the requests.
AsyncServerThreads int32 `protobuf:"varint,7,opt,name=async_server_threads,json=asyncServerThreads" json:"async_server_threads,omitempty"`
// Specify the number of cores to limit server to, if desired
CoreLimit int32 `protobuf:"varint,8,opt,name=core_limit,json=coreLimit" json:"core_limit,omitempty"`
// payload config, used in generic server
PayloadConfig *PayloadConfig `protobuf:"bytes,9,opt,name=payload_config,json=payloadConfig" json:"payload_config,omitempty"`
// Specify the cores we should run the server on, if desired
CoreList []int32 `protobuf:"varint,10,rep,name=core_list,json=coreList" json:"core_list,omitempty"`
}
ServerConfig.Descriptor
func (*ServerConfig) Descriptor() ([]byte, []int)
ServerConfig.GetPayloadConfig
func (m *ServerConfig) GetPayloadConfig() *PayloadConfig
ServerConfig.GetSecurityParams
func (m *ServerConfig) GetSecurityParams() *SecurityParams
ServerConfig.ProtoMessage
func (*ServerConfig) ProtoMessage()
ServerConfig.Reset
func (m *ServerConfig) Reset()
ServerConfig.String
func (m *ServerConfig) String() string
ServerStats
type ServerStats struct {
// wall clock time change in seconds since last reset
TimeElapsed float64 `protobuf:"fixed64,1,opt,name=time_elapsed,json=timeElapsed" json:"time_elapsed,omitempty"`
// change in user time (in seconds) used by the server since last reset
TimeUser float64 `protobuf:"fixed64,2,opt,name=time_user,json=timeUser" json:"time_user,omitempty"`
// change in server time (in seconds) used by the server process and all
// threads since last reset
TimeSystem float64 `protobuf:"fixed64,3,opt,name=time_system,json=timeSystem" json:"time_system,omitempty"`
}
ServerStats.Descriptor
func (*ServerStats) Descriptor() ([]byte, []int)
ServerStats.ProtoMessage
func (*ServerStats) ProtoMessage()
ServerStats.Reset
func (m *ServerStats) Reset()
ServerStats.String
func (m *ServerStats) String() string
ServerStatus
type ServerStatus struct {
Stats *ServerStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
// the port bound by the server
Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
// Number of cores available to the server
Cores int32 `protobuf:"varint,3,opt,name=cores" json:"cores,omitempty"`
}
ServerStatus.Descriptor
func (*ServerStatus) Descriptor() ([]byte, []int)
ServerStatus.GetStats
func (m *ServerStatus) GetStats() *ServerStats
ServerStatus.ProtoMessage
func (*ServerStatus) ProtoMessage()
ServerStatus.Reset
func (m *ServerStatus) Reset()
ServerStatus.String
func (m *ServerStatus) String() string
ServerType
type ServerType int32
ServerType_SYNC_SERVER (3 declarations)
const ( ServerType_SYNC_SERVER ServerType = 0 ServerType_ASYNC_SERVER ServerType = 1 ServerType_ASYNC_GENERIC_SERVER ServerType = 2 )
ServerType.EnumDescriptor
func (ServerType) EnumDescriptor() ([]byte, []int)
ServerType.String
func (x ServerType) String() string
SimpleProtoParams
type SimpleProtoParams struct {
ReqSize int32 `protobuf:"varint,1,opt,name=req_size,json=reqSize" json:"req_size,omitempty"`
RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize" json:"resp_size,omitempty"`
}
SimpleProtoParams.Descriptor
func (*SimpleProtoParams) Descriptor() ([]byte, []int)
SimpleProtoParams.ProtoMessage
func (*SimpleProtoParams) ProtoMessage()
SimpleProtoParams.Reset
func (m *SimpleProtoParams) Reset()
SimpleProtoParams.String
func (m *SimpleProtoParams) String() string
SimpleRequest
type SimpleRequest struct {
// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
ResponseSize int32 `protobuf:"varint,2,opt,name=response_size,json=responseSize" json:"response_size,omitempty"`
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
// Whether SimpleResponse should include username.
FillUsername bool `protobuf:"varint,4,opt,name=fill_username,json=fillUsername" json:"fill_username,omitempty"`
// Whether SimpleResponse should include OAuth scope.
FillOauthScope bool `protobuf:"varint,5,opt,name=fill_oauth_scope,json=fillOauthScope" json:"fill_oauth_scope,omitempty"`
// Compression algorithm to be used by the server for the response (stream)
ResponseCompression CompressionType `protobuf:"varint,6,opt,name=response_compression,json=responseCompression,enum=grpc.testing.CompressionType" json:"response_compression,omitempty"`
// Whether server should return a given status
ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
}
Unary request.
SimpleRequest.Descriptor
func (*SimpleRequest) Descriptor() ([]byte, []int)
SimpleRequest.GetPayload
func (m *SimpleRequest) GetPayload() *Payload
SimpleRequest.GetResponseStatus
func (m *SimpleRequest) GetResponseStatus() *EchoStatus
SimpleRequest.ProtoMessage
func (*SimpleRequest) ProtoMessage()
SimpleRequest.Reset
func (m *SimpleRequest) Reset()
SimpleRequest.String
func (m *SimpleRequest) String() string
SimpleResponse
type SimpleResponse struct {
// Payload to increase message size.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
// The user the request came from, for verifying authentication was
// successful when the client expected it.
Username string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
// OAuth scope.
OauthScope string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope" json:"oauth_scope,omitempty"`
}
Unary response, as configured by the request.
SimpleResponse.Descriptor
func (*SimpleResponse) Descriptor() ([]byte, []int)
SimpleResponse.GetPayload
func (m *SimpleResponse) GetPayload() *Payload
SimpleResponse.ProtoMessage
func (*SimpleResponse) ProtoMessage()
SimpleResponse.Reset
func (m *SimpleResponse) Reset()
SimpleResponse.String
func (m *SimpleResponse) String() string
StreamingInputCallRequest
type StreamingInputCallRequest struct {
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}
Client-streaming request.
StreamingInputCallRequest.Descriptor
func (*StreamingInputCallRequest) Descriptor() ([]byte, []int)
StreamingInputCallRequest.GetPayload
func (m *StreamingInputCallRequest) GetPayload() *Payload
StreamingInputCallRequest.ProtoMessage
func (*StreamingInputCallRequest) ProtoMessage()
StreamingInputCallRequest.Reset
func (m *StreamingInputCallRequest) Reset()
StreamingInputCallRequest.String
func (m *StreamingInputCallRequest) String() string
StreamingInputCallResponse
type StreamingInputCallResponse struct {
// Aggregated size of payloads received from the client.
AggregatedPayloadSize int32 `protobuf:"varint,1,opt,name=aggregated_payload_size,json=aggregatedPayloadSize" json:"aggregated_payload_size,omitempty"`
}
Client-streaming response.
StreamingInputCallResponse.Descriptor
func (*StreamingInputCallResponse) Descriptor() ([]byte, []int)
StreamingInputCallResponse.ProtoMessage
func (*StreamingInputCallResponse) ProtoMessage()
StreamingInputCallResponse.Reset
func (m *StreamingInputCallResponse) Reset()
StreamingInputCallResponse.String
func (m *StreamingInputCallResponse) String() string
StreamingOutputCallRequest
type StreamingOutputCallRequest struct {
// Desired payload type in the response from the server.
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
// stream.
ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
// Configuration for each expected response message.
ResponseParameters []*ResponseParameters `protobuf:"bytes,2,rep,name=response_parameters,json=responseParameters" json:"response_parameters,omitempty"`
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
// Compression algorithm to be used by the server for the response (stream)
ResponseCompression CompressionType `protobuf:"varint,6,opt,name=response_compression,json=responseCompression,enum=grpc.testing.CompressionType" json:"response_compression,omitempty"`
// Whether server should return a given status
ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
}
Server-streaming request.
StreamingOutputCallRequest.Descriptor
func (*StreamingOutputCallRequest) Descriptor() ([]byte, []int)
StreamingOutputCallRequest.GetPayload
func (m *StreamingOutputCallRequest) GetPayload() *Payload
StreamingOutputCallRequest.GetResponseParameters
func (m *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters
StreamingOutputCallRequest.GetResponseStatus
func (m *StreamingOutputCallRequest) GetResponseStatus() *EchoStatus
StreamingOutputCallRequest.ProtoMessage
func (*StreamingOutputCallRequest) ProtoMessage()
StreamingOutputCallRequest.Reset
func (m *StreamingOutputCallRequest) Reset()
StreamingOutputCallRequest.String
func (m *StreamingOutputCallRequest) String() string
StreamingOutputCallResponse
type StreamingOutputCallResponse struct {
// Payload to increase response size.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}
Server-streaming response, as configured by the request and parameters.
StreamingOutputCallResponse.Descriptor
func (*StreamingOutputCallResponse) Descriptor() ([]byte, []int)
StreamingOutputCallResponse.GetPayload
func (m *StreamingOutputCallResponse) GetPayload() *Payload
StreamingOutputCallResponse.ProtoMessage
func (*StreamingOutputCallResponse) ProtoMessage()
StreamingOutputCallResponse.Reset
func (m *StreamingOutputCallResponse) Reset()
StreamingOutputCallResponse.String
func (m *StreamingOutputCallResponse) String() string
UniformParams
type UniformParams struct {
InterarrivalLo float64 `protobuf:"fixed64,1,opt,name=interarrival_lo,json=interarrivalLo" json:"interarrival_lo,omitempty"`
InterarrivalHi float64 `protobuf:"fixed64,2,opt,name=interarrival_hi,json=interarrivalHi" json:"interarrival_hi,omitempty"`
}
UniformParams.Descriptor
func (*UniformParams) Descriptor() ([]byte, []int)
UniformParams.ProtoMessage
func (*UniformParams) ProtoMessage()
UniformParams.Reset
func (m *UniformParams) Reset()
UniformParams.String
func (m *UniformParams) String() string
Void
type Void struct {
}
Void.Descriptor
func (*Void) Descriptor() ([]byte, []int)
Void.ProtoMessage
func (*Void) ProtoMessage()
Void.Reset
func (m *Void) Reset()
Void.String
func (m *Void) String() string
WorkerServiceClient
type WorkerServiceClient interface {
// Start server with specified workload.
// First request sent specifies the ServerConfig followed by ServerStatus
// response. After that, a "Mark" can be sent anytime to request the latest
// stats. Closing the stream will initiate shutdown of the test server
// and once the shutdown has finished, the OK status is sent to terminate
// this RPC.
RunServer(ctx context.Context, opts ...grpc.CallOption) (WorkerService_RunServerClient, error)
// Start client with specified workload.
// First request sent specifies the ClientConfig followed by ClientStatus
// response. After that, a "Mark" can be sent anytime to request the latest
// stats. Closing the stream will initiate shutdown of the test client
// and once the shutdown has finished, the OK status is sent to terminate
// this RPC.
RunClient(ctx context.Context, opts ...grpc.CallOption) (WorkerService_RunClientClient, error)
// Just return the core count - unary call
CoreCount(ctx context.Context, in *CoreRequest, opts ...grpc.CallOption) (*CoreResponse, error)
// Quit this worker
QuitWorker(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Void, error)
}
NewWorkerServiceClient
func NewWorkerServiceClient(cc *grpc.ClientConn) WorkerServiceClient
WorkerServiceServer
type WorkerServiceServer interface {
// Start server with specified workload.
// First request sent specifies the ServerConfig followed by ServerStatus
// response. After that, a "Mark" can be sent anytime to request the latest
// stats. Closing the stream will initiate shutdown of the test server
// and once the shutdown has finished, the OK status is sent to terminate
// this RPC.
RunServer(WorkerService_RunServerServer) error
// Start client with specified workload.
// First request sent specifies the ClientConfig followed by ClientStatus
// response. After that, a "Mark" can be sent anytime to request the latest
// stats. Closing the stream will initiate shutdown of the test client
// and once the shutdown has finished, the OK status is sent to terminate
// this RPC.
RunClient(WorkerService_RunClientServer) error
// Just return the core count - unary call
CoreCount(context.Context, *CoreRequest) (*CoreResponse, error)
// Quit this worker
QuitWorker(context.Context, *Void) (*Void, error)
}
WorkerService_RunClientClient
type WorkerService_RunClientClient interface {
Send(*ClientArgs) error
Recv() (*ClientStatus, error)
grpc.ClientStream
}
WorkerService_RunClientServer
type WorkerService_RunClientServer interface {
Send(*ClientStatus) error
Recv() (*ClientArgs, error)
grpc.ServerStream
}
WorkerService_RunServerClient
type WorkerService_RunServerClient interface {
Send(*ServerArgs) error
Recv() (*ServerStatus, error)
grpc.ClientStream
}
WorkerService_RunServerServer
type WorkerService_RunServerServer interface {
Send(*ServerStatus) error
Recv() (*ServerArgs, error)
grpc.ServerStream
}