fix misspell (#1592)

This commit is contained in:
Menghan Li
2017-10-19 09:34:07 -07:00
committed by dfawley
parent 473b14250d
commit 94687c3b56
3 changed files with 4 additions and 4 deletions

View File

@ -100,7 +100,7 @@ func TestBlockingPickNoSubAvailable(t *testing.T) {
bp := newPickerWrapper() bp := newPickerWrapper()
var finishedCount uint64 var finishedCount uint64
bp.updatePicker(&testingPicker{err: balancer.ErrNoSubConnAvailable, maxCalled: goroutineCount}) bp.updatePicker(&testingPicker{err: balancer.ErrNoSubConnAvailable, maxCalled: goroutineCount})
// All goroutines should block because picker returns no sc avilable. // All goroutines should block because picker returns no sc available.
for i := goroutineCount; i > 0; i-- { for i := goroutineCount; i > 0; i-- {
go func() { go func() {
if tr, _, err := bp.pick(context.Background(), true, balancer.PickOptions{}); err != nil || tr != testT { if tr, _, err := bp.pick(context.Background(), true, balancer.PickOptions{}); err != nil || tr != testT {

View File

@ -417,7 +417,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
if sq > 1 { if sq > 1 {
t.streamsQuota.add(sq - 1) t.streamsQuota.add(sq - 1)
} }
// TODO(mmukhi): Benchmark if the perfomance gets better if count the metadata and other header fields // TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size. // first and create a slice of that exact size.
// Make the slice of certain predictable size to reduce allocations made by append. // Make the slice of certain predictable size to reduce allocations made by append.
hfLen := 7 // :method, :scheme, :path, :authority, content-type, user-agent, te hfLen := 7 // :method, :scheme, :path, :authority, content-type, user-agent, te

View File

@ -708,7 +708,7 @@ func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
} }
md = s.header md = s.header
s.mu.Unlock() s.mu.Unlock()
// TODO(mmukhi): Benchmark if the perfomance gets better if count the metadata and other header fields // TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size. // first and create a slice of that exact size.
headerFields := make([]hpack.HeaderField, 0, 2) // at least :status, content-type will be there if none else. headerFields := make([]hpack.HeaderField, 0, 2) // at least :status, content-type will be there if none else.
headerFields = append(headerFields, hpack.HeaderField{Name: ":status", Value: "200"}) headerFields = append(headerFields, hpack.HeaderField{Name: ":status", Value: "200"})
@ -769,7 +769,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
headersSent = true headersSent = true
} }
// TODO(mmukhi): Benchmark if the perfomance gets better if count the metadata and other header fields // TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size. // first and create a slice of that exact size.
headerFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else. headerFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else.
if !headersSent { if !headersSent {