Граф коммитов

43 Коммитов

Автор SHA1 Сообщение Дата
iamqizhao c3c8cfb2da fix tests 2015-05-27 16:01:18 -07:00
iamqizhao 1b5f15dda8 blocking when max concurrent stream limit is reached. 2015-05-26 18:14:05 -07:00
iamqizhao 3617cd5ab3 revert handshaker changes 2015-05-12 17:59:20 -07:00
Peter Edge 7c025e8694 move log package references to grpclog 2015-05-09 11:43:59 +02:00
Peter Edge 101c1e1935 change log package references to grpc/log 2015-05-09 01:16:40 +02:00
iamqizhao 0f85408fd4 Eliminate proto.Unmarshal in the generated code 2015-04-27 14:47:09 -07:00
iamqizhao 2cf2d0871b remove WithNetwork and add WithDialer to have more flexibility on dialing 2015-04-21 16:19:29 -07:00
iamqizhao 755059ebd3 remove some logging 2015-04-17 14:03:53 -07:00
iamqizhao 1b6e3a9200 gofmt 2015-04-17 14:00:21 -07:00
iamqizhao 3259049490 fix some typos and run gofmt 2015-04-17 13:50:18 -07:00
iamqizhao 319a8b74a7 close the ClientConn when a test case is done. 2015-03-25 18:39:17 -07:00
iamqizhao 8b08b2d7b2 Interface change to accommodate the support of non-protobuf data formats 2015-03-25 15:18:07 -07:00
iamqizhao 591c1176bc modify a comment 2015-03-23 12:36:08 -07:00
iamqizhao 9c6754e004 fix a malformed error status 2015-03-23 11:47:27 -07:00
iamqizhao 51496073b8 enlarge the dial timeout in a test case because travis might not be able to finish it in time. 2015-03-13 00:50:16 -07:00
iamqizhao e10de7abd1 fix some bugs 2015-03-13 00:16:18 -07:00
iamqizhao e6b45390ca Remove a debug log 2015-03-06 17:35:54 -08:00
iamqizhao 85034d5828 fix double wrapping of rpc status 2015-03-05 18:52:06 -08:00
iamqizhao 1182c6e87c minor polish 2015-03-05 14:24:32 -08:00
iamqizhao 57c1951dc9 tightened some rpcErr loose ends and revised some tests 2015-03-05 13:56:48 -08:00
iamqizhao b052a1255f Merge branch 'master' of https://github.com/grpc/grpc-go 2015-03-04 11:14:39 -08:00
iamqizhao 351e2d0297 add more tests for dial timeout and fix some bugs 2015-03-03 19:06:44 -08:00
iamqizhao a5ca6e56d2 Support timeout for grpc.Dial 2015-03-03 17:08:39 -08:00
Matt T. Proud c91d17acf1 Benchmark encode and cut encoding inefficiency.
This commit introduces the first microbenchmark for grpc, wherein
`encode` is benchmarked according to message size.  A conclusion of
the benchmark is that the removal of type switching found in
`binary.Write`, which is used in `encode` produces the following
encoding time and memory allocation footprint:

```
$ # Return to previous commit but benchmark.
$ go test ./... -test.bench="Benchmark*" > /tmp/before
$ # Return to working copy.
$ go test ./... -test.bench="Benchmark*" > /tmp/after
$ benchcmp /tmp/before /tmp/after
benchmark                 old ns/op     new ns/op     delta
BenchmarkEncode1B         1282          936           -26.99%
BenchmarkEncode1KiB       4865          4184          -14.00%
BenchmarkEncode8KiB       22686         21560         -4.96%
BenchmarkEncode64KiB      134451        116762        -13.16%
BenchmarkEncode512KiB     514044        361224        -29.73%
BenchmarkEncode1MiB       767096        636725        -17.00%

benchmark                 old MB/s     new MB/s     speedup
BenchmarkEncode1B         6.24         8.55         1.37x
BenchmarkEncode1KiB       212.11       246.63       1.16x
BenchmarkEncode8KiB       361.46       380.33       1.05x
BenchmarkEncode64KiB      487.50       561.35       1.15x
BenchmarkEncode512KiB     1019.94      1451.45      1.42x
BenchmarkEncode1MiB       1366.95      1646.84      1.20x

benchmark                 old allocs     new allocs     delta
BenchmarkEncode1B         6              3              -50.00%
BenchmarkEncode1KiB       8              5              -37.50%
BenchmarkEncode8KiB       8              5              -37.50%
BenchmarkEncode64KiB      8              5              -37.50%
BenchmarkEncode512KiB     8              5              -37.50%
BenchmarkEncode1MiB       8              5              -37.50%

benchmark                 old bytes     new bytes     delta
BenchmarkEncode1B         384           328           -14.58%
BenchmarkEncode1KiB       2816          2760          -1.99%
BenchmarkEncode8KiB       17283         17227         -0.32%
BenchmarkEncode64KiB      147856        147802        -0.04%
BenchmarkEncode512KiB     1065344       1065288       -0.01%
BenchmarkEncode1MiB       2113920       2113864       -0.00%
```

..., which is apropos of the comment in [encoding/binary]
(http://golang.org/pkg/encoding/binary), wherein ...

> This package favors simplicity over efficiency.

... is stated.

If `encode` is deemed to need further memory efficiencies, a mechanism
whereby a `proto.Buffer` is retained may be warranted, which is why the
original TODO remains.  The proposed improvement in this change is
simple and low-hanging.

I did not want to introduce yet-another protocol buffer message for
tests, but the ones under ...

> interop/grpc_testing/test.proto
> test/grpc_testing/test.proto

... have a fundamental dependency on `grpc` package due to their
generated stubs, which produces a cycle in the imports if the benchmark
were to attempt to import them for profiling.  The newly created ...

> test/grpc_message/test.proto

... protocol buffer package has no generated RPC service stubs, which
means it can be imported into the `grpc` package root without cycle.
2015-03-03 09:42:00 +01:00
iamqizhao 2b993cd479 rename the convenience function to set TLS creds 2015-02-25 22:57:07 -08:00
iamqizhao 2f821c8afc migrate to the new codegen solution 2015-02-19 18:43:28 -08:00
iamqizhao fc10c7b40c Let RecvProto return nil for client stream rpc 2015-02-19 16:48:59 -08:00
Matt T. Proud a720ae6f48 Make error conveyance more idiomatic.
This commit applies two bulk changes to the grpc error reporting
mechanisms:

(1.) Error strings for errors that originate within grpc are prefixed
    with the package name for better clarity for where they originate
    since they could percolate up in the users call chains to the
    originator.

(2.) Errors that are, in fact, singletons have been converted from
    fmt.Errorf to errors.New and assigned as package-level variables.
    This bodes particularly well for enabling API customers to elect to
    handle these errors upon receipt via equality comparison.  This had
    been previous impossible with the original API.

Supplementarily, ``gofmt -w -s=true`` has been run on the repository to
cleanup residual defects, and it has detected and repaired a few.

TEST=Manual go test ./...
2015-02-19 13:17:17 +01:00
iamqizhao 634392a1c6 Remove the 2nd RecvProto in the generated code for client streaming 2015-02-18 22:18:01 -08:00
iamqizhao 78d3bc72bf Make the generated code return nil intead of io.EOF when everything succeeds. 2015-02-13 17:10:37 -08:00
iamqizhao fe60321708 Fix some comments 2015-02-13 16:43:51 -08:00
iamqizhao a205ce5f65 cpp updates interop proto for auth interop testing. Update the proto correspondingly. 2015-02-13 11:11:33 -08:00
iamqizhao ece135da8b Use the generated code from upcoming new grpc codegen 2015-02-12 17:04:32 -08:00
iamqizhao 2b6078284c gofmt on end2end_test.go 2015-02-11 19:05:22 -08:00
iamqizhao 9c9eb38d0d Replace rpc with grpc in a error message. 2015-02-11 19:03:57 -08:00
iamqizhao 5c0599c9f0 Use interop proto to replace the one used in end2end_test.go because interop proto is better for testing corner and error cases. The code change is mostly copied/pasted from interop client & server. 2015-02-11 19:00:55 -08:00
iamqizhao fd7185b96f fix an error formatting 2015-02-09 19:16:31 -08:00
iamqizhao 38fe463420 add the missing license in the previous commit 2015-02-09 16:39:03 -08:00
iamqizhao f61c1dbb05 rename the proto dir, prepare for porting into google3 2015-02-09 16:35:10 -08:00
David Symonds 49a2ba59b6 Fix up a couple of other imports to use the new package name. 2015-02-09 11:50:54 +11:00
David Symonds 416f68f4b3 Update import paths to use the new official location of the Go gRPC package. 2015-02-09 11:46:20 +11:00
David Symonds 9e789c396b Rename top level package from "rpc" to "grpc".
Also move the nascent package doc to doc.go.
2015-02-09 11:45:33 +11:00
David Symonds e71095e0ec Move source files up one level.
The top-level directory in this repository is going to be
the main "grpc" package.
2015-02-09 11:33:38 +11:00