Minor fixes

This commit is contained in:
Menghan Li 2016-04-29 11:32:29 -07:00
parent 0d31c857ae
commit 67497aad6c
2 changed files with 5 additions and 1 deletions

View File

@ -195,6 +195,10 @@ func DoByteBufStreamingRoundTrip(stream testpb.BenchmarkService_StreamingCallCli
}
var in []byte
if err := stream.(grpc.ClientStream).RecvMsg(&in); err != nil {
// EOF should be a valid error here.
if err == io.EOF {
return nil
}
return grpc.Errorf(grpc.Code(err), "StreamingCall(_).(ClientStream).RecvMsg: %v", grpc.ErrorDesc(err))
}
return nil

View File

@ -312,7 +312,7 @@ func (bc *benchmarkClient) getStats() *testpb.ClientStats {
}
// reset clears the contents for histogram and set lastResetTime to Now().
// It is often called to get ready for benchmark runs.
// It is called to get ready for benchmark runs.
func (bc *benchmarkClient) reset() {
bc.mu.Lock()
defer bc.mu.Unlock()