Before this fix, stream is removed from activeStreams in finishStream,
which happens when the service handler returns status, without waiting
for the status to be sent by loopyWriter. If GracefulStop() is called in
between, it will close the connection (because activeStreams is empty),
which causes the RPC to fail with "transport is closing". This change
moves the activeStreams cleanup into loopyWriter, after sending status
on wire.
* Expose a method from the internal package to get to the raw
StatusProto wrapped by the status error, and use it from
http2Server.WriteStatus().
* Add a helper method in internal/testutils to compare two status errors
and update test code to use that instead of reflect.DeepEqual()
* A few more improvements to the benchmark code.
* In benchmain/main.go:
* Define types for function arguments to make code more readable
* Significantly simplify the code as a result of stats package refactor.
* In benchresult/main.go
* Simplify code as a result of stats package refactor.
* In stats/stats.go
* Define and expose featureIndex enum.
* Refactor the types used to store features, results, stats etc.
* Provide easy to use methods to add/modify/read/dump stats info.
* Delete stats/util.go - dead code.
* When a RST_STREAM is received by the server transport, a cleanupStream
item is placed into controlbuf no matter what.
* Updates comments.
* Replaces getCleanupStream with inline struct initialization.
From [release notes](https://golang.org/doc/go1.12#vet):
The go vet command has been rewritten to serve as the
base for a range of different source code analysis tools. See
the golang.org/x/tools/go/analysis
package for details. A side-effect is that go tool vet
is no longer supported. External tools that use go tool vet must be
changed to use go vet. Using go vet instead of go tool vet should work
with all supported versions of Go.