mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Initial stab at the protocol * initial protocol sketch for node pool manager * Added http header frame as a message * Force the use of WithAgent variants when creating a server * adds grpc models for node pool manager plus go deps * Naming things is really hard * Merge (and optionally purge) details received by the NPM * WIP: starting to add the runner-side functionality of the new data plane * WIP: Basic startup of grpc server for pure runner. Needs proper certs. * Go fmt * Initial agent for LB nodes. * Agent implementation for LB nodes. * Pass keys and certs to LB node agent. * Remove accidentally left reference to env var. * Add env variables for certificate files * stub out the capacity and group membership server channels * implement server-side runner manager service * removes unused variable * fixes build error * splits up GetCall and GetLBGroupId * Change LB node agent to use TLS connection. * Encode call model as JSON to send to runner node. * Use hybrid client in LB node agent. This should provide access to get app and route information for the call from an API node. * More error handling on the pure runner side * Tentative fix for GetCall problem: set deadlines correctly when reserving slot * Connect loop for LB agent to runner nodes. * Extract runner connection function in LB agent. * drops committed capacity counts * Bugfix - end state tracker only in submit * Do logs properly * adds first pass of tracking capacity metrics in agent * maked memory capacity metric uint64 * maked memory capacity metric uint64 * removes use of old capacity field * adds remove capacity call * merges overwritten reconnect logic * First pass of a NPM Provide a service that talks to a (simulated) CP. - Receive incoming capacity assertions from LBs for LBGs - expire LB requests after a short period - ask the CP to add runners to a LBG - note runner set changes and readvertise - scale down by marking runners as "draining" - shut off draining runners after some cool-down period * add capacity update on schedule * Send periodic capcacity metrics Sending capcacity metrics to node pool manager * splits grpc and api interfaces for capacity manager * failure to advertise capacity shouldn't panic * Add some instructions for starting DP/CP parts. * Create the poolmanager server with TLS * Use logrus * Get npm compiling with cert fixups. * Fix: pure runner should not start async processing * brings runner, nulb and npm together * Add field to acknowledgment to record slot allocation latency; fix a bug too * iterating on pool manager locking issue * raises timeout of placement retry loop * Fix up NPM Improve logging Ensure that channels etc. are actually initialised in the structure creation! * Update the docs - runners GRPC port is 9120 * Bugfix: return runner pool accurately. * Double locking * Note purges as LBs stop talking to us * Get the purging of old LBs working. * Tweak: on restart, load runner set before making scaling decisions. * more agent synchronization improvements * Deal with teh CP pulling out active hosts from under us. * lock at lbgroup level * Send request and receive response from runner. * Add capacity check right before slot reservation * Pass the full Call into the receive loop. * Wait for the data from the runner before finishing * force runner list refresh every time * Don't init db and mq for pure runners * adds shutdown of npm * fixes broken log line * Extract an interface for the Predictor used by the NPM * purge drained connections from npm * Refactor of the LB agent into the agent package * removes capacitytest wip * Fix undefined err issue * updating README for poolmanager set up * ues retrying dial for lb to npm connections * Rename lb_calls to lb_agent now that all functionality is there * Use the right deadline and errors in LBAgent * Make stream error flag per-call rather than global otherwise the whole runner is damaged by one call dropping * abstracting gRPCNodePool * Make stream error flag per-call rather than global otherwise the whole runner is damaged by one call dropping * Add some init checks for LB and pure runner nodes * adding some useful debug * Fix default db and mq for lb node * removes unreachable code, fixes typo * Use datastore as logstore in API nodes. This fixes a bug caused by trying to insert logs into a nil logstore. It was nil because it wasn't being set for API nodes. * creates placement abstraction and moves capacity APIs to NodePool * removed TODO, added logging * Dial reconnections for LB <-> runners LB grpc connections to runners are established using a backoff stategy in event of reconnections, this allows to let the LB up even in case one of the runners go away and reconnect to it as soon as it is back. * Add a status call to the Runner protocol Stub at the moment. To be used for things like draindown, health checks. * Remove comment. * makes assign/release capacity lockless * Fix hanging issue in lb agent when connections drop * Add the CH hash from fnlb Select this with FN_PLACER=ch when launching the LB. * small improvement for locking on reloadLBGmembership * Stabilise the list of Runenrs returned by NodePool The NodePoolManager makes some attempt to keep the list of runner nodes advertised as stable as possible. Let's preserve this effort in the client side. The main point of this is to attempt to keep the same runner at the same inxed in the []Runner returned by NodePool.Runners(lbgid); the ch algorithm likes it when this is the case. * Factor out a generator function for the Runners so that mocks can be injected * temporarily allow lbgroup to be specified in HTTP header, while we sort out changes to the model * fixes bug with nil runners * Initial work for mocking things in tests * fix for anonymouse go routine error * fixing lb_test to compile * Refactor: internal objects for gRPCNodePool are now injectable, with defaults for the real world case * Make GRPC port configurable, fix weird handling of web port too * unit test reload Members * check on runner creation failure * adding nullRunner in case of failure during runner creation * Refactored capacity advertisements/aggregations. Made grpc advertisement post asynchronous and non-blocking. * make capacityEntry private * Change the runner gRPC bind address. This uses the existing `whoAmI` function, so that the gRPC server works when the runner is running on a different host. * Add support for multiple fixed runners to pool mgr * Added harness for dataplane system tests, minor refactors * Add Dockerfiles for components, along with docs. * Doc fix: second runner needs a different name. * Let us have three runners in system tests, why not * The first system test running a function in API/LB/PureRunner mode * Add unit test for Advertiser logic * Fix issue with Pure Runner not sending the last data frame * use config in models.Call as a temporary mechanism to override lb group ID * make gofmt happy * Updates documentation for how to configure lb groups for an app/route * small refactor unit test * Factor NodePool into its own package * Lots of fixes to Pure Runner - concurrency woes with errors and cancellations * New dataplane with static runnerpool (#813) Added static node pool as default implementation * moved nullRunner to grpc package * remove duplication in README * fix go vet issues * Fix server initialisation in api tests * Tiny logging changes in pool manager. Using `WithError` instead of `Errorf` when appropriate. * Change some log levels in the pure runner * fixing readme * moves multitenant compute documentation * adds introduction to multitenant readme * Proper triggering of system tests in makefile * Fix insructions about starting up the components * Change db file for system tests to avoid contention in parallel tests * fixes revisions from merge * Fix merge issue with handling of reserved slot * renaming nulb to lb in the doc and images folder * better TryExec sleep logic clean shutdown In this change we implement a better way to deal with the sleep inside the for loop during the attempt for placing a call. Plus we added a clean way to shutdown the connections with external component when we shut down the server. * System_test mysql port set mysql port for system test to a different value to the one set for the api tests to avoid conflicts as they can run in parallel. * change the container name for system-test * removes flaky test TestRouteRunnerExecution pending resolution by issue #796 * amend remove_containers to remove new added containers * Rework capacity reservation logic at a higher level for now * LB agent implements Submit rather than delegating. * Fix go vet linting errors * Changed a couple of error levels * Fix formatting * removes commmented out test * adds snappy to vendor directory * updates Gopkg and vendor directories, removing snappy and addhing siphash * wait for db containers to come up before starting the tests * make system tests start API node on 8085 to avoid port conflict with api_tests * avoid port conflicts with api_test.sh which are run in parallel * fixes postgres port conflict and issue with removal of old containers * Remove spurious println
1195 lines
40 KiB
Go
1195 lines
40 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: control.proto
|
|
|
|
/*
|
|
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
|
|
*/
|
|
package grpc_testing
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type ClientType int32
|
|
|
|
const (
|
|
ClientType_SYNC_CLIENT ClientType = 0
|
|
ClientType_ASYNC_CLIENT ClientType = 1
|
|
)
|
|
|
|
var ClientType_name = map[int32]string{
|
|
0: "SYNC_CLIENT",
|
|
1: "ASYNC_CLIENT",
|
|
}
|
|
var ClientType_value = map[string]int32{
|
|
"SYNC_CLIENT": 0,
|
|
"ASYNC_CLIENT": 1,
|
|
}
|
|
|
|
func (x ClientType) String() string {
|
|
return proto.EnumName(ClientType_name, int32(x))
|
|
}
|
|
func (ClientType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
type ServerType int32
|
|
|
|
const (
|
|
ServerType_SYNC_SERVER ServerType = 0
|
|
ServerType_ASYNC_SERVER ServerType = 1
|
|
ServerType_ASYNC_GENERIC_SERVER ServerType = 2
|
|
)
|
|
|
|
var ServerType_name = map[int32]string{
|
|
0: "SYNC_SERVER",
|
|
1: "ASYNC_SERVER",
|
|
2: "ASYNC_GENERIC_SERVER",
|
|
}
|
|
var ServerType_value = map[string]int32{
|
|
"SYNC_SERVER": 0,
|
|
"ASYNC_SERVER": 1,
|
|
"ASYNC_GENERIC_SERVER": 2,
|
|
}
|
|
|
|
func (x ServerType) String() string {
|
|
return proto.EnumName(ServerType_name, int32(x))
|
|
}
|
|
func (ServerType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
type RpcType int32
|
|
|
|
const (
|
|
RpcType_UNARY RpcType = 0
|
|
RpcType_STREAMING RpcType = 1
|
|
)
|
|
|
|
var RpcType_name = map[int32]string{
|
|
0: "UNARY",
|
|
1: "STREAMING",
|
|
}
|
|
var RpcType_value = map[string]int32{
|
|
"UNARY": 0,
|
|
"STREAMING": 1,
|
|
}
|
|
|
|
func (x RpcType) String() string {
|
|
return proto.EnumName(RpcType_name, int32(x))
|
|
}
|
|
func (RpcType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
// Parameters of poisson process distribution, which is a good representation
|
|
// of activity coming in from independent identical stationary sources.
|
|
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"`
|
|
}
|
|
|
|
func (m *PoissonParams) Reset() { *m = PoissonParams{} }
|
|
func (m *PoissonParams) String() string { return proto.CompactTextString(m) }
|
|
func (*PoissonParams) ProtoMessage() {}
|
|
func (*PoissonParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *PoissonParams) GetOfferedLoad() float64 {
|
|
if m != nil {
|
|
return m.OfferedLoad
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
func (m *UniformParams) Reset() { *m = UniformParams{} }
|
|
func (m *UniformParams) String() string { return proto.CompactTextString(m) }
|
|
func (*UniformParams) ProtoMessage() {}
|
|
func (*UniformParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *UniformParams) GetInterarrivalLo() float64 {
|
|
if m != nil {
|
|
return m.InterarrivalLo
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *UniformParams) GetInterarrivalHi() float64 {
|
|
if m != nil {
|
|
return m.InterarrivalHi
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DeterministicParams struct {
|
|
OfferedLoad float64 `protobuf:"fixed64,1,opt,name=offered_load,json=offeredLoad" json:"offered_load,omitempty"`
|
|
}
|
|
|
|
func (m *DeterministicParams) Reset() { *m = DeterministicParams{} }
|
|
func (m *DeterministicParams) String() string { return proto.CompactTextString(m) }
|
|
func (*DeterministicParams) ProtoMessage() {}
|
|
func (*DeterministicParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
func (m *DeterministicParams) GetOfferedLoad() float64 {
|
|
if m != nil {
|
|
return m.OfferedLoad
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
func (m *ParetoParams) Reset() { *m = ParetoParams{} }
|
|
func (m *ParetoParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ParetoParams) ProtoMessage() {}
|
|
func (*ParetoParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
|
|
|
func (m *ParetoParams) GetInterarrivalBase() float64 {
|
|
if m != nil {
|
|
return m.InterarrivalBase
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ParetoParams) GetAlpha() float64 {
|
|
if m != nil {
|
|
return m.Alpha
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// Once an RPC finishes, immediately start a new one.
|
|
// No configuration parameters needed.
|
|
type ClosedLoopParams struct {
|
|
}
|
|
|
|
func (m *ClosedLoopParams) Reset() { *m = ClosedLoopParams{} }
|
|
func (m *ClosedLoopParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ClosedLoopParams) ProtoMessage() {}
|
|
func (*ClosedLoopParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
|
|
|
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"`
|
|
}
|
|
|
|
func (m *LoadParams) Reset() { *m = LoadParams{} }
|
|
func (m *LoadParams) String() string { return proto.CompactTextString(m) }
|
|
func (*LoadParams) ProtoMessage() {}
|
|
func (*LoadParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
|
|
|
type isLoadParams_Load interface {
|
|
isLoadParams_Load()
|
|
}
|
|
|
|
type LoadParams_ClosedLoop struct {
|
|
ClosedLoop *ClosedLoopParams `protobuf:"bytes,1,opt,name=closed_loop,json=closedLoop,oneof"`
|
|
}
|
|
type LoadParams_Poisson struct {
|
|
Poisson *PoissonParams `protobuf:"bytes,2,opt,name=poisson,oneof"`
|
|
}
|
|
type LoadParams_Uniform struct {
|
|
Uniform *UniformParams `protobuf:"bytes,3,opt,name=uniform,oneof"`
|
|
}
|
|
type LoadParams_Determ struct {
|
|
Determ *DeterministicParams `protobuf:"bytes,4,opt,name=determ,oneof"`
|
|
}
|
|
type LoadParams_Pareto struct {
|
|
Pareto *ParetoParams `protobuf:"bytes,5,opt,name=pareto,oneof"`
|
|
}
|
|
|
|
func (*LoadParams_ClosedLoop) isLoadParams_Load() {}
|
|
func (*LoadParams_Poisson) isLoadParams_Load() {}
|
|
func (*LoadParams_Uniform) isLoadParams_Load() {}
|
|
func (*LoadParams_Determ) isLoadParams_Load() {}
|
|
func (*LoadParams_Pareto) isLoadParams_Load() {}
|
|
|
|
func (m *LoadParams) GetLoad() isLoadParams_Load {
|
|
if m != nil {
|
|
return m.Load
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LoadParams) GetClosedLoop() *ClosedLoopParams {
|
|
if x, ok := m.GetLoad().(*LoadParams_ClosedLoop); ok {
|
|
return x.ClosedLoop
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LoadParams) GetPoisson() *PoissonParams {
|
|
if x, ok := m.GetLoad().(*LoadParams_Poisson); ok {
|
|
return x.Poisson
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LoadParams) GetUniform() *UniformParams {
|
|
if x, ok := m.GetLoad().(*LoadParams_Uniform); ok {
|
|
return x.Uniform
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LoadParams) GetDeterm() *DeterministicParams {
|
|
if x, ok := m.GetLoad().(*LoadParams_Determ); ok {
|
|
return x.Determ
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LoadParams) GetPareto() *ParetoParams {
|
|
if x, ok := m.GetLoad().(*LoadParams_Pareto); ok {
|
|
return x.Pareto
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
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{}) {
|
|
return _LoadParams_OneofMarshaler, _LoadParams_OneofUnmarshaler, _LoadParams_OneofSizer, []interface{}{
|
|
(*LoadParams_ClosedLoop)(nil),
|
|
(*LoadParams_Poisson)(nil),
|
|
(*LoadParams_Uniform)(nil),
|
|
(*LoadParams_Determ)(nil),
|
|
(*LoadParams_Pareto)(nil),
|
|
}
|
|
}
|
|
|
|
func _LoadParams_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*LoadParams)
|
|
// load
|
|
switch x := m.Load.(type) {
|
|
case *LoadParams_ClosedLoop:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.ClosedLoop); err != nil {
|
|
return err
|
|
}
|
|
case *LoadParams_Poisson:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Poisson); err != nil {
|
|
return err
|
|
}
|
|
case *LoadParams_Uniform:
|
|
b.EncodeVarint(3<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Uniform); err != nil {
|
|
return err
|
|
}
|
|
case *LoadParams_Determ:
|
|
b.EncodeVarint(4<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Determ); err != nil {
|
|
return err
|
|
}
|
|
case *LoadParams_Pareto:
|
|
b.EncodeVarint(5<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Pareto); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("LoadParams.Load has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _LoadParams_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*LoadParams)
|
|
switch tag {
|
|
case 1: // load.closed_loop
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ClosedLoopParams)
|
|
err := b.DecodeMessage(msg)
|
|
m.Load = &LoadParams_ClosedLoop{msg}
|
|
return true, err
|
|
case 2: // load.poisson
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(PoissonParams)
|
|
err := b.DecodeMessage(msg)
|
|
m.Load = &LoadParams_Poisson{msg}
|
|
return true, err
|
|
case 3: // load.uniform
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(UniformParams)
|
|
err := b.DecodeMessage(msg)
|
|
m.Load = &LoadParams_Uniform{msg}
|
|
return true, err
|
|
case 4: // load.determ
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(DeterministicParams)
|
|
err := b.DecodeMessage(msg)
|
|
m.Load = &LoadParams_Determ{msg}
|
|
return true, err
|
|
case 5: // load.pareto
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ParetoParams)
|
|
err := b.DecodeMessage(msg)
|
|
m.Load = &LoadParams_Pareto{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _LoadParams_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*LoadParams)
|
|
// load
|
|
switch x := m.Load.(type) {
|
|
case *LoadParams_ClosedLoop:
|
|
s := proto.Size(x.ClosedLoop)
|
|
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *LoadParams_Poisson:
|
|
s := proto.Size(x.Poisson)
|
|
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *LoadParams_Uniform:
|
|
s := proto.Size(x.Uniform)
|
|
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *LoadParams_Determ:
|
|
s := proto.Size(x.Determ)
|
|
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *LoadParams_Pareto:
|
|
s := proto.Size(x.Pareto)
|
|
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
// presence of SecurityParams implies use of TLS
|
|
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"`
|
|
}
|
|
|
|
func (m *SecurityParams) Reset() { *m = SecurityParams{} }
|
|
func (m *SecurityParams) String() string { return proto.CompactTextString(m) }
|
|
func (*SecurityParams) ProtoMessage() {}
|
|
func (*SecurityParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
|
|
|
func (m *SecurityParams) GetUseTestCa() bool {
|
|
if m != nil {
|
|
return m.UseTestCa
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *SecurityParams) GetServerHostOverride() string {
|
|
if m != nil {
|
|
return m.ServerHostOverride
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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,packed,name=core_list,json=coreList" json:"core_list,omitempty"`
|
|
CoreLimit int32 `protobuf:"varint,14,opt,name=core_limit,json=coreLimit" json:"core_limit,omitempty"`
|
|
}
|
|
|
|
func (m *ClientConfig) Reset() { *m = ClientConfig{} }
|
|
func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
|
|
func (*ClientConfig) ProtoMessage() {}
|
|
func (*ClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
|
|
|
func (m *ClientConfig) GetServerTargets() []string {
|
|
if m != nil {
|
|
return m.ServerTargets
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetClientType() ClientType {
|
|
if m != nil {
|
|
return m.ClientType
|
|
}
|
|
return ClientType_SYNC_CLIENT
|
|
}
|
|
|
|
func (m *ClientConfig) GetSecurityParams() *SecurityParams {
|
|
if m != nil {
|
|
return m.SecurityParams
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetOutstandingRpcsPerChannel() int32 {
|
|
if m != nil {
|
|
return m.OutstandingRpcsPerChannel
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ClientConfig) GetClientChannels() int32 {
|
|
if m != nil {
|
|
return m.ClientChannels
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ClientConfig) GetAsyncClientThreads() int32 {
|
|
if m != nil {
|
|
return m.AsyncClientThreads
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ClientConfig) GetRpcType() RpcType {
|
|
if m != nil {
|
|
return m.RpcType
|
|
}
|
|
return RpcType_UNARY
|
|
}
|
|
|
|
func (m *ClientConfig) GetLoadParams() *LoadParams {
|
|
if m != nil {
|
|
return m.LoadParams
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetPayloadConfig() *PayloadConfig {
|
|
if m != nil {
|
|
return m.PayloadConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetHistogramParams() *HistogramParams {
|
|
if m != nil {
|
|
return m.HistogramParams
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetCoreList() []int32 {
|
|
if m != nil {
|
|
return m.CoreList
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientConfig) GetCoreLimit() int32 {
|
|
if m != nil {
|
|
return m.CoreLimit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ClientStatus struct {
|
|
Stats *ClientStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
|
|
}
|
|
|
|
func (m *ClientStatus) Reset() { *m = ClientStatus{} }
|
|
func (m *ClientStatus) String() string { return proto.CompactTextString(m) }
|
|
func (*ClientStatus) ProtoMessage() {}
|
|
func (*ClientStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
|
|
|
func (m *ClientStatus) GetStats() *ClientStats {
|
|
if m != nil {
|
|
return m.Stats
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Request current stats
|
|
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"`
|
|
}
|
|
|
|
func (m *Mark) Reset() { *m = Mark{} }
|
|
func (m *Mark) String() string { return proto.CompactTextString(m) }
|
|
func (*Mark) ProtoMessage() {}
|
|
func (*Mark) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
|
|
|
func (m *Mark) GetReset_() bool {
|
|
if m != nil {
|
|
return m.Reset_
|
|
}
|
|
return false
|
|
}
|
|
|
|
type ClientArgs struct {
|
|
// Types that are valid to be assigned to Argtype:
|
|
// *ClientArgs_Setup
|
|
// *ClientArgs_Mark
|
|
Argtype isClientArgs_Argtype `protobuf_oneof:"argtype"`
|
|
}
|
|
|
|
func (m *ClientArgs) Reset() { *m = ClientArgs{} }
|
|
func (m *ClientArgs) String() string { return proto.CompactTextString(m) }
|
|
func (*ClientArgs) ProtoMessage() {}
|
|
func (*ClientArgs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
|
|
|
type isClientArgs_Argtype interface {
|
|
isClientArgs_Argtype()
|
|
}
|
|
|
|
type ClientArgs_Setup struct {
|
|
Setup *ClientConfig `protobuf:"bytes,1,opt,name=setup,oneof"`
|
|
}
|
|
type ClientArgs_Mark struct {
|
|
Mark *Mark `protobuf:"bytes,2,opt,name=mark,oneof"`
|
|
}
|
|
|
|
func (*ClientArgs_Setup) isClientArgs_Argtype() {}
|
|
func (*ClientArgs_Mark) isClientArgs_Argtype() {}
|
|
|
|
func (m *ClientArgs) GetArgtype() isClientArgs_Argtype {
|
|
if m != nil {
|
|
return m.Argtype
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientArgs) GetSetup() *ClientConfig {
|
|
if x, ok := m.GetArgtype().(*ClientArgs_Setup); ok {
|
|
return x.Setup
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClientArgs) GetMark() *Mark {
|
|
if x, ok := m.GetArgtype().(*ClientArgs_Mark); ok {
|
|
return x.Mark
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
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{}) {
|
|
return _ClientArgs_OneofMarshaler, _ClientArgs_OneofUnmarshaler, _ClientArgs_OneofSizer, []interface{}{
|
|
(*ClientArgs_Setup)(nil),
|
|
(*ClientArgs_Mark)(nil),
|
|
}
|
|
}
|
|
|
|
func _ClientArgs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ClientArgs)
|
|
// argtype
|
|
switch x := m.Argtype.(type) {
|
|
case *ClientArgs_Setup:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Setup); err != nil {
|
|
return err
|
|
}
|
|
case *ClientArgs_Mark:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Mark); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ClientArgs.Argtype has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ClientArgs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ClientArgs)
|
|
switch tag {
|
|
case 1: // argtype.setup
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ClientConfig)
|
|
err := b.DecodeMessage(msg)
|
|
m.Argtype = &ClientArgs_Setup{msg}
|
|
return true, err
|
|
case 2: // argtype.mark
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(Mark)
|
|
err := b.DecodeMessage(msg)
|
|
m.Argtype = &ClientArgs_Mark{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ClientArgs_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ClientArgs)
|
|
// argtype
|
|
switch x := m.Argtype.(type) {
|
|
case *ClientArgs_Setup:
|
|
s := proto.Size(x.Setup)
|
|
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ClientArgs_Mark:
|
|
s := proto.Size(x.Mark)
|
|
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
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,packed,name=core_list,json=coreList" json:"core_list,omitempty"`
|
|
}
|
|
|
|
func (m *ServerConfig) Reset() { *m = ServerConfig{} }
|
|
func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
|
|
func (*ServerConfig) ProtoMessage() {}
|
|
func (*ServerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
|
|
|
func (m *ServerConfig) GetServerType() ServerType {
|
|
if m != nil {
|
|
return m.ServerType
|
|
}
|
|
return ServerType_SYNC_SERVER
|
|
}
|
|
|
|
func (m *ServerConfig) GetSecurityParams() *SecurityParams {
|
|
if m != nil {
|
|
return m.SecurityParams
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ServerConfig) GetPort() int32 {
|
|
if m != nil {
|
|
return m.Port
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ServerConfig) GetAsyncServerThreads() int32 {
|
|
if m != nil {
|
|
return m.AsyncServerThreads
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ServerConfig) GetCoreLimit() int32 {
|
|
if m != nil {
|
|
return m.CoreLimit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ServerConfig) GetPayloadConfig() *PayloadConfig {
|
|
if m != nil {
|
|
return m.PayloadConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ServerConfig) GetCoreList() []int32 {
|
|
if m != nil {
|
|
return m.CoreList
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ServerArgs struct {
|
|
// Types that are valid to be assigned to Argtype:
|
|
// *ServerArgs_Setup
|
|
// *ServerArgs_Mark
|
|
Argtype isServerArgs_Argtype `protobuf_oneof:"argtype"`
|
|
}
|
|
|
|
func (m *ServerArgs) Reset() { *m = ServerArgs{} }
|
|
func (m *ServerArgs) String() string { return proto.CompactTextString(m) }
|
|
func (*ServerArgs) ProtoMessage() {}
|
|
func (*ServerArgs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
|
|
|
|
type isServerArgs_Argtype interface {
|
|
isServerArgs_Argtype()
|
|
}
|
|
|
|
type ServerArgs_Setup struct {
|
|
Setup *ServerConfig `protobuf:"bytes,1,opt,name=setup,oneof"`
|
|
}
|
|
type ServerArgs_Mark struct {
|
|
Mark *Mark `protobuf:"bytes,2,opt,name=mark,oneof"`
|
|
}
|
|
|
|
func (*ServerArgs_Setup) isServerArgs_Argtype() {}
|
|
func (*ServerArgs_Mark) isServerArgs_Argtype() {}
|
|
|
|
func (m *ServerArgs) GetArgtype() isServerArgs_Argtype {
|
|
if m != nil {
|
|
return m.Argtype
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ServerArgs) GetSetup() *ServerConfig {
|
|
if x, ok := m.GetArgtype().(*ServerArgs_Setup); ok {
|
|
return x.Setup
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ServerArgs) GetMark() *Mark {
|
|
if x, ok := m.GetArgtype().(*ServerArgs_Mark); ok {
|
|
return x.Mark
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
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{}) {
|
|
return _ServerArgs_OneofMarshaler, _ServerArgs_OneofUnmarshaler, _ServerArgs_OneofSizer, []interface{}{
|
|
(*ServerArgs_Setup)(nil),
|
|
(*ServerArgs_Mark)(nil),
|
|
}
|
|
}
|
|
|
|
func _ServerArgs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ServerArgs)
|
|
// argtype
|
|
switch x := m.Argtype.(type) {
|
|
case *ServerArgs_Setup:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Setup); err != nil {
|
|
return err
|
|
}
|
|
case *ServerArgs_Mark:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Mark); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ServerArgs.Argtype has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ServerArgs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ServerArgs)
|
|
switch tag {
|
|
case 1: // argtype.setup
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ServerConfig)
|
|
err := b.DecodeMessage(msg)
|
|
m.Argtype = &ServerArgs_Setup{msg}
|
|
return true, err
|
|
case 2: // argtype.mark
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(Mark)
|
|
err := b.DecodeMessage(msg)
|
|
m.Argtype = &ServerArgs_Mark{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ServerArgs_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ServerArgs)
|
|
// argtype
|
|
switch x := m.Argtype.(type) {
|
|
case *ServerArgs_Setup:
|
|
s := proto.Size(x.Setup)
|
|
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ServerArgs_Mark:
|
|
s := proto.Size(x.Mark)
|
|
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
func (m *ServerStatus) Reset() { *m = ServerStatus{} }
|
|
func (m *ServerStatus) String() string { return proto.CompactTextString(m) }
|
|
func (*ServerStatus) ProtoMessage() {}
|
|
func (*ServerStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
|
|
|
|
func (m *ServerStatus) GetStats() *ServerStats {
|
|
if m != nil {
|
|
return m.Stats
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ServerStatus) GetPort() int32 {
|
|
if m != nil {
|
|
return m.Port
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ServerStatus) GetCores() int32 {
|
|
if m != nil {
|
|
return m.Cores
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CoreRequest struct {
|
|
}
|
|
|
|
func (m *CoreRequest) Reset() { *m = CoreRequest{} }
|
|
func (m *CoreRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CoreRequest) ProtoMessage() {}
|
|
func (*CoreRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
|
|
|
|
type CoreResponse struct {
|
|
// Number of cores available on the server
|
|
Cores int32 `protobuf:"varint,1,opt,name=cores" json:"cores,omitempty"`
|
|
}
|
|
|
|
func (m *CoreResponse) Reset() { *m = CoreResponse{} }
|
|
func (m *CoreResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*CoreResponse) ProtoMessage() {}
|
|
func (*CoreResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
|
|
|
|
func (m *CoreResponse) GetCores() int32 {
|
|
if m != nil {
|
|
return m.Cores
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Void struct {
|
|
}
|
|
|
|
func (m *Void) Reset() { *m = Void{} }
|
|
func (m *Void) String() string { return proto.CompactTextString(m) }
|
|
func (*Void) ProtoMessage() {}
|
|
func (*Void) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
|
|
|
|
// A single performance scenario: input to qps_json_driver
|
|
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"`
|
|
}
|
|
|
|
func (m *Scenario) Reset() { *m = Scenario{} }
|
|
func (m *Scenario) String() string { return proto.CompactTextString(m) }
|
|
func (*Scenario) ProtoMessage() {}
|
|
func (*Scenario) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
|
|
|
|
func (m *Scenario) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Scenario) GetClientConfig() *ClientConfig {
|
|
if m != nil {
|
|
return m.ClientConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Scenario) GetNumClients() int32 {
|
|
if m != nil {
|
|
return m.NumClients
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Scenario) GetServerConfig() *ServerConfig {
|
|
if m != nil {
|
|
return m.ServerConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Scenario) GetNumServers() int32 {
|
|
if m != nil {
|
|
return m.NumServers
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Scenario) GetWarmupSeconds() int32 {
|
|
if m != nil {
|
|
return m.WarmupSeconds
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Scenario) GetBenchmarkSeconds() int32 {
|
|
if m != nil {
|
|
return m.BenchmarkSeconds
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Scenario) GetSpawnLocalWorkerCount() int32 {
|
|
if m != nil {
|
|
return m.SpawnLocalWorkerCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// A set of scenarios to be run with qps_json_driver
|
|
type Scenarios struct {
|
|
Scenarios []*Scenario `protobuf:"bytes,1,rep,name=scenarios" json:"scenarios,omitempty"`
|
|
}
|
|
|
|
func (m *Scenarios) Reset() { *m = Scenarios{} }
|
|
func (m *Scenarios) String() string { return proto.CompactTextString(m) }
|
|
func (*Scenarios) ProtoMessage() {}
|
|
func (*Scenarios) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
|
|
|
|
func (m *Scenarios) GetScenarios() []*Scenario {
|
|
if m != nil {
|
|
return m.Scenarios
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*PoissonParams)(nil), "grpc.testing.PoissonParams")
|
|
proto.RegisterType((*UniformParams)(nil), "grpc.testing.UniformParams")
|
|
proto.RegisterType((*DeterministicParams)(nil), "grpc.testing.DeterministicParams")
|
|
proto.RegisterType((*ParetoParams)(nil), "grpc.testing.ParetoParams")
|
|
proto.RegisterType((*ClosedLoopParams)(nil), "grpc.testing.ClosedLoopParams")
|
|
proto.RegisterType((*LoadParams)(nil), "grpc.testing.LoadParams")
|
|
proto.RegisterType((*SecurityParams)(nil), "grpc.testing.SecurityParams")
|
|
proto.RegisterType((*ClientConfig)(nil), "grpc.testing.ClientConfig")
|
|
proto.RegisterType((*ClientStatus)(nil), "grpc.testing.ClientStatus")
|
|
proto.RegisterType((*Mark)(nil), "grpc.testing.Mark")
|
|
proto.RegisterType((*ClientArgs)(nil), "grpc.testing.ClientArgs")
|
|
proto.RegisterType((*ServerConfig)(nil), "grpc.testing.ServerConfig")
|
|
proto.RegisterType((*ServerArgs)(nil), "grpc.testing.ServerArgs")
|
|
proto.RegisterType((*ServerStatus)(nil), "grpc.testing.ServerStatus")
|
|
proto.RegisterType((*CoreRequest)(nil), "grpc.testing.CoreRequest")
|
|
proto.RegisterType((*CoreResponse)(nil), "grpc.testing.CoreResponse")
|
|
proto.RegisterType((*Void)(nil), "grpc.testing.Void")
|
|
proto.RegisterType((*Scenario)(nil), "grpc.testing.Scenario")
|
|
proto.RegisterType((*Scenarios)(nil), "grpc.testing.Scenarios")
|
|
proto.RegisterEnum("grpc.testing.ClientType", ClientType_name, ClientType_value)
|
|
proto.RegisterEnum("grpc.testing.ServerType", ServerType_name, ServerType_value)
|
|
proto.RegisterEnum("grpc.testing.RpcType", RpcType_name, RpcType_value)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("control.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 1179 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x6f, 0x6f, 0xdb, 0xb6,
|
|
0x13, 0xb6, 0x1d, 0xdb, 0xb1, 0x4e, 0xb6, 0xe3, 0x1f, 0x7f, 0xe9, 0xa0, 0xa6, 0x69, 0x97, 0x6a,
|
|
0x1b, 0x16, 0x64, 0x40, 0x5a, 0x78, 0x05, 0xba, 0x62, 0x2f, 0x02, 0xc7, 0x33, 0xea, 0x00, 0x69,
|
|
0x96, 0xd1, 0x69, 0x87, 0xbe, 0x12, 0x18, 0x99, 0xb1,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