vendor update for CSI 0.3.0

This commit is contained in:
gman
2018-07-18 16:47:22 +02:00
parent 6f484f92fc
commit 8ea659f0d5
6810 changed files with 438061 additions and 193861 deletions

View File

@ -249,23 +249,23 @@ func performRPCs(gauge *gauge, conn *grpc.ClientConn, selector *weightedRandomTe
}
func logParameterInfo(addresses []string, tests []testCaseWithWeight) {
grpclog.Printf("server_addresses: %s", *serverAddresses)
grpclog.Printf("test_cases: %s", *testCases)
grpclog.Printf("test_duration_secs: %d", *testDurationSecs)
grpclog.Printf("num_channels_per_server: %d", *numChannelsPerServer)
grpclog.Printf("num_stubs_per_channel: %d", *numStubsPerChannel)
grpclog.Printf("metrics_port: %d", *metricsPort)
grpclog.Printf("use_tls: %t", *useTLS)
grpclog.Printf("use_test_ca: %t", *testCA)
grpclog.Printf("server_host_override: %s", *tlsServerName)
grpclog.Infof("server_addresses: %s", *serverAddresses)
grpclog.Infof("test_cases: %s", *testCases)
grpclog.Infof("test_duration_secs: %d", *testDurationSecs)
grpclog.Infof("num_channels_per_server: %d", *numChannelsPerServer)
grpclog.Infof("num_stubs_per_channel: %d", *numStubsPerChannel)
grpclog.Infof("metrics_port: %d", *metricsPort)
grpclog.Infof("use_tls: %t", *useTLS)
grpclog.Infof("use_test_ca: %t", *testCA)
grpclog.Infof("server_host_override: %s", *tlsServerName)
grpclog.Println("addresses:")
grpclog.Infoln("addresses:")
for i, addr := range addresses {
grpclog.Printf("%d. %s\n", i+1, addr)
grpclog.Infof("%d. %s\n", i+1, addr)
}
grpclog.Println("tests:")
grpclog.Infoln("tests:")
for i, test := range tests {
grpclog.Printf("%d. %v\n", i+1, test)
grpclog.Infof("%d. %v\n", i+1, test)
}
}
@ -332,6 +332,6 @@ func main() {
close(stop)
}
wg.Wait()
grpclog.Printf(" ===== ALL DONE ===== ")
grpclog.Infof(" ===== ALL DONE ===== ")
}

View File

@ -1,17 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: metrics.proto
/*
Package grpc_testing is a generated protocol buffer package.
It is generated from these files:
metrics.proto
It has these top-level messages:
GaugeResponse
GaugeRequest
EmptyMessage
*/
package grpc_testing
import proto "github.com/golang/protobuf/proto"
@ -36,31 +25,53 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Response message containing the gauge name and value
type GaugeResponse struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Types that are valid to be assigned to Value:
// *GaugeResponse_LongValue
// *GaugeResponse_DoubleValue
// *GaugeResponse_StringValue
Value isGaugeResponse_Value `protobuf_oneof:"value"`
Value isGaugeResponse_Value `protobuf_oneof:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GaugeResponse) Reset() { *m = GaugeResponse{} }
func (m *GaugeResponse) String() string { return proto.CompactTextString(m) }
func (*GaugeResponse) ProtoMessage() {}
func (*GaugeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *GaugeResponse) Reset() { *m = GaugeResponse{} }
func (m *GaugeResponse) String() string { return proto.CompactTextString(m) }
func (*GaugeResponse) ProtoMessage() {}
func (*GaugeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c9a45afc44ac5637, []int{0}
}
func (m *GaugeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GaugeResponse.Unmarshal(m, b)
}
func (m *GaugeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GaugeResponse.Marshal(b, m, deterministic)
}
func (dst *GaugeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GaugeResponse.Merge(dst, src)
}
func (m *GaugeResponse) XXX_Size() int {
return xxx_messageInfo_GaugeResponse.Size(m)
}
func (m *GaugeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GaugeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GaugeResponse proto.InternalMessageInfo
type isGaugeResponse_Value interface {
isGaugeResponse_Value()
}
type GaugeResponse_LongValue struct {
LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,oneof"`
LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,proto3,oneof"`
}
type GaugeResponse_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,oneof"`
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type GaugeResponse_StringValue struct {
StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,oneof"`
StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"`
}
func (*GaugeResponse_LongValue) isGaugeResponse_Value() {}
@ -165,13 +176,13 @@ func _GaugeResponse_OneofSizer(msg proto.Message) (n int) {
// value
switch x := m.Value.(type) {
case *GaugeResponse_LongValue:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.LongValue))
case *GaugeResponse_DoubleValue:
n += proto.SizeVarint(3<<3 | proto.WireFixed64)
n += 1 // tag and wire
n += 8
case *GaugeResponse_StringValue:
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.StringValue)))
n += len(x.StringValue)
case nil:
@ -183,13 +194,35 @@ func _GaugeResponse_OneofSizer(msg proto.Message) (n int) {
// Request message containing the gauge name
type GaugeRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GaugeRequest) Reset() { *m = GaugeRequest{} }
func (m *GaugeRequest) String() string { return proto.CompactTextString(m) }
func (*GaugeRequest) ProtoMessage() {}
func (*GaugeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *GaugeRequest) Reset() { *m = GaugeRequest{} }
func (m *GaugeRequest) String() string { return proto.CompactTextString(m) }
func (*GaugeRequest) ProtoMessage() {}
func (*GaugeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c9a45afc44ac5637, []int{1}
}
func (m *GaugeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GaugeRequest.Unmarshal(m, b)
}
func (m *GaugeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GaugeRequest.Marshal(b, m, deterministic)
}
func (dst *GaugeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GaugeRequest.Merge(dst, src)
}
func (m *GaugeRequest) XXX_Size() int {
return xxx_messageInfo_GaugeRequest.Size(m)
}
func (m *GaugeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GaugeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GaugeRequest proto.InternalMessageInfo
func (m *GaugeRequest) GetName() string {
if m != nil {
@ -199,12 +232,34 @@ func (m *GaugeRequest) GetName() string {
}
type EmptyMessage struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EmptyMessage) Reset() { *m = EmptyMessage{} }
func (m *EmptyMessage) String() string { return proto.CompactTextString(m) }
func (*EmptyMessage) ProtoMessage() {}
func (*EmptyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *EmptyMessage) Reset() { *m = EmptyMessage{} }
func (m *EmptyMessage) String() string { return proto.CompactTextString(m) }
func (*EmptyMessage) ProtoMessage() {}
func (*EmptyMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c9a45afc44ac5637, []int{2}
}
func (m *EmptyMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmptyMessage.Unmarshal(m, b)
}
func (m *EmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EmptyMessage.Marshal(b, m, deterministic)
}
func (dst *EmptyMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EmptyMessage.Merge(dst, src)
}
func (m *EmptyMessage) XXX_Size() int {
return xxx_messageInfo_EmptyMessage.Size(m)
}
func (m *EmptyMessage) XXX_DiscardUnknown() {
xxx_messageInfo_EmptyMessage.DiscardUnknown(m)
}
var xxx_messageInfo_EmptyMessage proto.InternalMessageInfo
func init() {
proto.RegisterType((*GaugeResponse)(nil), "grpc.testing.GaugeResponse")
@ -220,8 +275,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for MetricsService service
// MetricsServiceClient is the client API for MetricsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MetricsServiceClient interface {
// Returns the values of all the gauges that are currently being maintained by
// the service
@ -239,7 +295,7 @@ func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient {
}
func (c *metricsServiceClient) GetAllGauges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (MetricsService_GetAllGaugesClient, error) {
stream, err := grpc.NewClientStream(ctx, &_MetricsService_serviceDesc.Streams[0], c.cc, "/grpc.testing.MetricsService/GetAllGauges", opts...)
stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/grpc.testing.MetricsService/GetAllGauges", opts...)
if err != nil {
return nil, err
}
@ -272,15 +328,14 @@ func (x *metricsServiceGetAllGaugesClient) Recv() (*GaugeResponse, error) {
func (c *metricsServiceClient) GetGauge(ctx context.Context, in *GaugeRequest, opts ...grpc.CallOption) (*GaugeResponse, error) {
out := new(GaugeResponse)
err := grpc.Invoke(ctx, "/grpc.testing.MetricsService/GetGauge", in, out, c.cc, opts...)
err := c.cc.Invoke(ctx, "/grpc.testing.MetricsService/GetGauge", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for MetricsService service
// MetricsServiceServer is the server API for MetricsService service.
type MetricsServiceServer interface {
// Returns the values of all the gauges that are currently being maintained by
// the service
@ -351,9 +406,9 @@ var _MetricsService_serviceDesc = grpc.ServiceDesc{
Metadata: "metrics.proto",
}
func init() { proto.RegisterFile("metrics.proto", fileDescriptor0) }
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_metrics_c9a45afc44ac5637) }
var fileDescriptor0 = []byte{
var fileDescriptor_metrics_c9a45afc44ac5637 = []byte{
// 256 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x3f, 0x4f, 0xc3, 0x30,
0x10, 0xc5, 0x6b, 0x5a, 0xfe, 0xf4, 0x70, 0x3b, 0x78, 0xaa, 0xca, 0x40, 0x14, 0x96, 0x4c, 0x11,

View File

@ -55,14 +55,14 @@ func printMetrics(client metricspb.MetricsServiceClient, totalOnly bool) {
}
v := gaugeResponse.GetLongValue()
if !totalOnly {
grpclog.Printf("%s: %d", gaugeResponse.Name, v)
grpclog.Infof("%s: %d", gaugeResponse.Name, v)
}
overallQPS += v
}
if rpcStatus != io.EOF {
grpclog.Fatalf("failed to finish server streaming: %v", rpcStatus)
}
grpclog.Printf("overall qps: %d", overallQPS)
grpclog.Infof("overall qps: %d", overallQPS)
}
func main() {