Address review comments

This commit is contained in:
Menghan Li
2016-04-28 16:02:27 -07:00
parent 997b80914b
commit dad9308fa3
7 changed files with 12 additions and 8 deletions

View File

@ -173,6 +173,10 @@ func DoStreamingRoundTrip(stream testpb.BenchmarkService_StreamingCallClient, re
return grpc.Errorf(grpc.Code(err), "StreamingCall(_).Send: %v", grpc.ErrorDesc(err)) return grpc.Errorf(grpc.Code(err), "StreamingCall(_).Send: %v", grpc.ErrorDesc(err))
} }
if _, err := stream.Recv(); err != nil { if _, err := stream.Recv(); err != nil {
// EOF should be a valid error here.
if err == io.EOF {
return nil
}
return grpc.Errorf(grpc.Code(err), "StreamingCall(_).Recv: %v", grpc.ErrorDesc(err)) return grpc.Errorf(grpc.Code(err), "StreamingCall(_).Recv: %v", grpc.ErrorDesc(err))
} }
return nil return nil

View File

@ -1,4 +1,4 @@
// Copyright 2015, Google Inc. // Copyright 2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,4 @@
// Copyright 2016, Google Inc.
// Copyright 2015-2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View File

@ -1,4 +1,4 @@
// Copyright 2015, Google Inc. // Copyright 2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View File

@ -1,4 +1,4 @@
// Copyright 2015, Google Inc. // Copyright 2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View File

@ -1,4 +1,4 @@
// Copyright 2015, Google Inc. // Copyright 2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -45,8 +45,8 @@ message ServerStats {
// Histogram params based on grpc/support/histogram.c // Histogram params based on grpc/support/histogram.c
message HistogramParams { message HistogramParams {
double resolution = 1; // first bucket is [0, 1 + resolution) double resolution = 1; // first bucket is [0, 1 + resolution)
double max_possible = 2; // use enough buckets to allow this value double max_possible = 2; // use enough buckets to allow this value
} }
// Histogram data based on grpc/support/histogram.c // Histogram data based on grpc/support/histogram.c

View File

@ -145,6 +145,7 @@ func NewHistogram(opts HistogramOptions) *Histogram {
return &h return &h
} }
// Clear resets all the content of histogram.
func (h *Histogram) Clear() { func (h *Histogram) Clear() {
h.count = newCounter() h.count = newCounter()
h.sum = newCounter() h.sum = newCounter()