import "v.io/x/ref/runtime/internal/rpc/benchmark"
package benchmark provides simple tools to measure the performance of the IPC system.
var BenchmarkDesc rpc.InterfaceDesc = descBenchmark
BenchmarkDesc describes the Benchmark interface.
type BenchmarkClientMethods interface { // Echo returns the payload that it receives. Echo(_ *context.T, Payload []byte, _ ...rpc.CallOpt) ([]byte, error) // EchoStream returns the payload that it receives via the stream. EchoStream(*context.T, ...rpc.CallOpt) (BenchmarkEchoStreamClientCall, error) }
BenchmarkClientMethods is the client interface containing Benchmark methods.
type BenchmarkClientStub interface { BenchmarkClientMethods }
BenchmarkClientStub embeds BenchmarkClientMethods and is a placeholder for additional management operations.
func BenchmarkClient(name string) BenchmarkClientStub
BenchmarkClient returns a client stub for Benchmark.
type BenchmarkEchoStreamClientCall interface { BenchmarkEchoStreamClientStream // Finish performs the equivalent of SendStream().Close, then blocks until // the server is done, and returns the positional return values for the call. // // Finish returns immediately if the call has been canceled; depending on the // timing the output could either be an error signaling cancelation, or the // valid positional return values from the server. // // Calling Finish is mandatory for releasing stream resources, unless the call // has been canceled or any of the other methods return an error. Finish should // be called at most once. Finish() error }
BenchmarkEchoStreamClientCall represents the call returned from Benchmark.EchoStream.
type BenchmarkEchoStreamClientStream interface { // RecvStream returns the receiver side of the Benchmark.EchoStream client stream. RecvStream() interface { // Advance stages an item so that it may be retrieved via Value. Returns // true iff there is an item to retrieve. Advance must be called before // Value is called. May block if an item is not available. Advance() bool // Value returns the item that was staged by Advance. May panic if Advance // returned false or was not called. Never blocks. Value() []byte // Err returns any error encountered by Advance. Never blocks. Err() error } // SendStream returns the send side of the Benchmark.EchoStream client stream. SendStream() interface { // Send places the item onto the output stream. Returns errors // encountered while sending, or if Send is called after Close or // the stream has been canceled. Blocks if there is no buffer // space; will unblock when buffer space is available or after // the stream has been canceled. Send(item []byte) error // Close indicates to the server that no more items will be sent; // server Recv calls will receive io.EOF after all sent items. // This is an optional call - e.g. a client might call Close if it // needs to continue receiving items from the server after it's // done sending. Returns errors encountered while closing, or if // Close is called after the stream has been canceled. Like Send, // blocks if there is no buffer space available. Close() error } }
BenchmarkEchoStreamClientStream is the client stream for Benchmark.EchoStream.
type BenchmarkEchoStreamServerCall interface { rpc.ServerCall BenchmarkEchoStreamServerStream }
BenchmarkEchoStreamServerCall represents the context passed to Benchmark.EchoStream.
type BenchmarkEchoStreamServerCallStub struct { rpc.StreamServerCall // contains filtered or unexported fields }
BenchmarkEchoStreamServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements BenchmarkEchoStreamServerCall.
func (s *BenchmarkEchoStreamServerCallStub) Init(call rpc.StreamServerCall)
Init initializes BenchmarkEchoStreamServerCallStub from rpc.StreamServerCall.
func (s *BenchmarkEchoStreamServerCallStub) RecvStream() interface { Advance() bool Value() []byte Err() error }
RecvStream returns the receiver side of the Benchmark.EchoStream server stream.
func (s *BenchmarkEchoStreamServerCallStub) SendStream() interface { Send(item []byte) error }
SendStream returns the send side of the Benchmark.EchoStream server stream.
type BenchmarkEchoStreamServerStream interface { // RecvStream returns the receiver side of the Benchmark.EchoStream server stream. RecvStream() interface { // Advance stages an item so that it may be retrieved via Value. Returns // true iff there is an item to retrieve. Advance must be called before // Value is called. May block if an item is not available. Advance() bool // Value returns the item that was staged by Advance. May panic if Advance // returned false or was not called. Never blocks. Value() []byte // Err returns any error encountered by Advance. Never blocks. Err() error } // SendStream returns the send side of the Benchmark.EchoStream server stream. SendStream() interface { // Send places the item onto the output stream. Returns errors encountered // while sending. Blocks if there is no buffer space; will unblock when // buffer space is available. Send(item []byte) error } }
BenchmarkEchoStreamServerStream is the server stream for Benchmark.EchoStream.
type BenchmarkServerMethods interface { // Echo returns the payload that it receives. Echo(_ *context.T, _ rpc.ServerCall, Payload []byte) ([]byte, error) // EchoStream returns the payload that it receives via the stream. EchoStream(*context.T, BenchmarkEchoStreamServerCall) error }
BenchmarkServerMethods is the interface a server writer implements for Benchmark.
type BenchmarkServerStub interface { BenchmarkServerStubMethods // DescribeInterfaces the Benchmark interfaces. Describe__() []rpc.InterfaceDesc }
BenchmarkServerStub adds universal methods to BenchmarkServerStubMethods.
func BenchmarkServer(impl BenchmarkServerMethods) BenchmarkServerStub
BenchmarkServer returns a server stub for Benchmark. It converts an implementation of BenchmarkServerMethods into an object that may be used by rpc.Server.
type BenchmarkServerStubMethods interface { // Echo returns the payload that it receives. Echo(_ *context.T, _ rpc.ServerCall, Payload []byte) ([]byte, error) // EchoStream returns the payload that it receives via the stream. EchoStream(*context.T, *BenchmarkEchoStreamServerCallStub) error }
BenchmarkServerStubMethods is the server interface containing Benchmark methods, as expected by rpc.Server. The only difference between this interface and BenchmarkServerMethods is the streaming methods.
type Caveat struct { Id []byte `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` ParamVom []byte `protobuf:"bytes,2,req,name=paramVom" json:"paramVom,omitempty"` XXX_unrecognized []byte `json:"-"` }
type Certificate struct { Extension *string `protobuf:"bytes,1,req,name=extension" json:"extension,omitempty"` PublicKey []byte `protobuf:"bytes,2,req,name=publicKey" json:"publicKey,omitempty"` Caveats []*Caveat `protobuf:"bytes,3,rep,name=caveats" json:"caveats,omitempty"` Signature *Signature `protobuf:"bytes,4,req,name=signature" json:"signature,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *Certificate) GetCaveats() []*Caveat
func (m *Certificate) GetExtension() string
func (m *Certificate) GetPublicKey() []byte
func (m *Certificate) GetSignature() *Signature
func (*Certificate) ProtoMessage()
func (m *Certificate) Reset()
func (m *Certificate) String() string
type CertificateChain struct { Certificates []*Certificate `protobuf:"bytes,1,rep,name=certificates" json:"certificates,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *CertificateChain) GetCertificates() []*Certificate
func (*CertificateChain) ProtoMessage()
func (m *CertificateChain) Reset()
func (m *CertificateChain) String() string
type RpcRequest struct { Suffix *string `protobuf:"bytes,1,req,name=suffix" json:"suffix,omitempty"` Method *string `protobuf:"bytes,2,req,name=method" json:"method,omitempty"` NumPosArgs *uint64 `protobuf:"varint,3,req,name=numPosArgs" json:"numPosArgs,omitempty"` EndStreamArgs *bool `protobuf:"varint,4,req,name=endStreamArgs" json:"endStreamArgs,omitempty"` Deadline *TimeWireDeadline `protobuf:"bytes,5,req,name=deadline" json:"deadline,omitempty"` GrantedBlessings *SecurityWireBlessings `protobuf:"bytes,6,req,name=grantedBlessings" json:"grantedBlessings,omitempty"` TraceRequest *VtraceRequest `protobuf:"bytes,7,req,name=traceRequest" json:"traceRequest,omitempty"` Language *string `protobuf:"bytes,8,req,name=language" json:"language,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *RpcRequest) GetDeadline() *TimeWireDeadline
func (m *RpcRequest) GetEndStreamArgs() bool
func (m *RpcRequest) GetGrantedBlessings() *SecurityWireBlessings
func (m *RpcRequest) GetLanguage() string
func (m *RpcRequest) GetMethod() string
func (m *RpcRequest) GetNumPosArgs() uint64
func (m *RpcRequest) GetSuffix() string
func (m *RpcRequest) GetTraceRequest() *VtraceRequest
func (*RpcRequest) ProtoMessage()
func (m *RpcRequest) Reset()
func (m *RpcRequest) String() string
type RpcResponse struct { Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` EndStreamResults *bool `protobuf:"varint,2,req,name=endStreamResults" json:"endStreamResults,omitempty"` NumPosResults *uint64 `protobuf:"varint,3,req,name=numPosResults" json:"numPosResults,omitempty"` TraceResponse *VtraceResponse `protobuf:"bytes,4,req,name=traceResponse" json:"traceResponse,omitempty"` AckBlessings *bool `protobuf:"varint,5,req,name=ackBlessings" json:"ackBlessings,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *RpcResponse) GetAckBlessings() bool
func (m *RpcResponse) GetEndStreamResults() bool
func (m *RpcResponse) GetError() string
func (m *RpcResponse) GetNumPosResults() uint64
func (m *RpcResponse) GetTraceResponse() *VtraceResponse
func (*RpcResponse) ProtoMessage()
func (m *RpcResponse) Reset()
func (m *RpcResponse) String() string
type SecurityWireBlessings struct { CertificateChains []*CertificateChain `protobuf:"bytes,1,rep,name=certificateChains" json:"certificateChains,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *SecurityWireBlessings) GetCertificateChains() []*CertificateChain
func (*SecurityWireBlessings) ProtoMessage()
func (m *SecurityWireBlessings) Reset()
func (m *SecurityWireBlessings) String() string
type Signature struct { Purpose []byte `protobuf:"bytes,1,req,name=purpose" json:"purpose,omitempty"` Hash *string `protobuf:"bytes,2,req,name=hash" json:"hash,omitempty"` R []byte `protobuf:"bytes,3,req,name=r" json:"r,omitempty"` S []byte `protobuf:"bytes,4,req,name=s" json:"s,omitempty"` XXX_unrecognized []byte `json:"-"` }
type TimeDuration struct { Seconds *int64 `protobuf:"varint,1,req,name=seconds" json:"seconds,omitempty"` Nanos *int64 `protobuf:"varint,2,req,name=nanos" json:"nanos,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *TimeDuration) GetNanos() int64
func (m *TimeDuration) GetSeconds() int64
func (*TimeDuration) ProtoMessage()
func (m *TimeDuration) Reset()
func (m *TimeDuration) String() string
type TimeTime struct { Seconds *int64 `protobuf:"varint,1,req,name=seconds" json:"seconds,omitempty"` Nanos *int32 `protobuf:"varint,2,req,name=nanos" json:"nanos,omitempty"` XXX_unrecognized []byte `json:"-"` }
type TimeWireDeadline struct { FromNow *TimeDuration `protobuf:"bytes,1,req,name=fromNow" json:"fromNow,omitempty"` NoDeadline *bool `protobuf:"varint,2,req,name=noDeadline" json:"noDeadline,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *TimeWireDeadline) GetFromNow() *TimeDuration
func (m *TimeWireDeadline) GetNoDeadline() bool
func (*TimeWireDeadline) ProtoMessage()
func (m *TimeWireDeadline) Reset()
func (m *TimeWireDeadline) String() string
type VtraceAnnotation struct { When *TimeTime `protobuf:"bytes,1,req,name=when" json:"when,omitempty"` Msg *string `protobuf:"bytes,2,req,name=msg" json:"msg,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *VtraceAnnotation) GetMsg() string
func (m *VtraceAnnotation) GetWhen() *TimeTime
func (*VtraceAnnotation) ProtoMessage()
func (m *VtraceAnnotation) Reset()
func (m *VtraceAnnotation) String() string
type VtraceRequest struct { SpanId []byte `protobuf:"bytes,1,req,name=spanId" json:"spanId,omitempty"` TraceId []byte `protobuf:"bytes,2,req,name=traceId" json:"traceId,omitempty"` Flags *int32 `protobuf:"varint,3,req,name=flags" json:"flags,omitempty"` LogLevel *int32 `protobuf:"varint,4,req,name=logLevel" json:"logLevel,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *VtraceRequest) GetFlags() int32
func (m *VtraceRequest) GetLogLevel() int32
func (m *VtraceRequest) GetSpanId() []byte
func (m *VtraceRequest) GetTraceId() []byte
func (*VtraceRequest) ProtoMessage()
func (m *VtraceRequest) Reset()
func (m *VtraceRequest) String() string
type VtraceResponse struct { TraceFlags *int32 `protobuf:"varint,1,req,name=traceFlags" json:"traceFlags,omitempty"` Trace *VtraceTraceRecord `protobuf:"bytes,2,req,name=trace" json:"trace,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *VtraceResponse) GetTrace() *VtraceTraceRecord
func (m *VtraceResponse) GetTraceFlags() int32
func (*VtraceResponse) ProtoMessage()
func (m *VtraceResponse) Reset()
func (m *VtraceResponse) String() string
type VtraceSpanRecord struct { Id []byte `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` Parent []byte `protobuf:"bytes,2,req,name=parent" json:"parent,omitempty"` Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` Start *TimeTime `protobuf:"bytes,4,req,name=start" json:"start,omitempty"` End *TimeTime `protobuf:"bytes,5,req,name=end" json:"end,omitempty"` Annotations []*VtraceAnnotation `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *VtraceSpanRecord) GetAnnotations() []*VtraceAnnotation
func (m *VtraceSpanRecord) GetEnd() *TimeTime
func (m *VtraceSpanRecord) GetId() []byte
func (m *VtraceSpanRecord) GetName() string
func (m *VtraceSpanRecord) GetParent() []byte
func (m *VtraceSpanRecord) GetStart() *TimeTime
func (*VtraceSpanRecord) ProtoMessage()
func (m *VtraceSpanRecord) Reset()
func (m *VtraceSpanRecord) String() string
type VtraceTraceRecord struct { Id []byte `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` SpanRecord []*VtraceSpanRecord `protobuf:"bytes,2,rep,name=spanRecord" json:"spanRecord,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (m *VtraceTraceRecord) GetId() []byte
func (m *VtraceTraceRecord) GetSpanRecord() []*VtraceSpanRecord
func (*VtraceTraceRecord) ProtoMessage()
func (m *VtraceTraceRecord) Reset()
func (m *VtraceTraceRecord) String() string
Path | Synopsis |
---|---|
benchmark | Command benchmark runs the benchmark client. |
benchmarkd | Command benchmarkd runs the benchmark server. |
internal |
Package benchmark imports 8 packages (graph) and is imported by 5 packages. Updated 2021-01-19. Refresh now. Tools for package owners.