Commit Graph

208 Commits

Author SHA1 Message Date
Damien Neil f818fd2a02
all: regenerate .pb.go files using cmd/protoc-gen-go-grpc (#3646)
Change regenerate.sh to use cmd/protoc-gen-go-grpc and rerun it.
This splits the gRPC service definitions into separate files, but
otherwise has no changes.
2020-05-28 13:52:49 -07:00
Bryan Boreham f62d68d513
benchmark: exit from UnconstrainedStreamingCall() when stream is canceled (#3623) 2020-05-18 13:39:57 -07:00
Damien Neil 15653fec60
all: refactor .pb.go generation (#3451)
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.

Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.

Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.
2020-04-24 08:54:03 -07:00
Easwar Swaminathan 843b06d549
benchmark: Fix segfault in benchmark code. (#3555)
If a benchmark run did not specify req/resp payload curve files, and the
result from that run is used on the `benchresult` binary, it will
segfault because there is no check for the presence of the payload curve
option before printing the set of features used. Added a sanity check
there.
2020-04-22 12:00:57 -07:00
Menghan Li c7079afb44
lint: fail on missing package comment (#3524)
golint does check for missing package comment, but with low confidence.
golint checks each file, and complains on every file missing package comment, even though another file in the same package has the comment.

This PR adds a golint check with low min_confidence, and filters out false-positives.
2020-04-15 09:59:17 -07:00
Doug Fawley 6b9bf4296e
Revert "profiling: add hooks within grpc (#3159)" (#3378)
This reverts commit 83263d17f7.
2020-02-14 07:56:46 -08:00
Adhityaa Chandrasekar 83263d17f7
profiling: add hooks within grpc (#3159) 2020-02-12 11:10:44 -08:00
Garrett Gutierrez 132187f04c
Modified tests to use tlogger. (#3343)
* Modified tests to use tlogger.

* Fail on errors, with error expectations.

* Added expects and MixedCapsed grpclb_config tests

* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go

* Added ExpectErrorN()

* Removed redundant leak checks

* Fixed new test

* Made tlogger globals into tlogger methods

* ErrorsLeft -> EndTest

* Removed some redundant lines

* Fixed error in test and empty map in EndTest
2020-02-06 13:03:20 -08:00
Doug Fawley b88d2d7465
protobuf: update protoc-gen-go version and generated code (#3345) 2020-01-30 10:23:21 -08:00
Adhityaa Chandrasekar cf9eb4f51c benchmark: add support for payload size curves (#3248) 2020-01-06 14:45:41 -08:00
Adhityaa Chandrasekar cb0e11b54f benchmark: include go and grpc version in result files (#3242) 2019-12-12 13:18:36 -08:00
Easwar Swaminathan 7c1d326729
benchmark: Enable server keepalive in benchmarks (#3196) 2019-11-20 09:06:10 -08:00
Doug Fawley e2cfd1c28f
internal: update proto library version (#3025)
Also, two fixes:

- Fix long-standing `.travis.yml` bug where `VET_SKIP_PROTO` was not `export`ed (so not seen by `vet.sh`).
- Update `vet.sh` to work with new `goimports -l` that does not print a `:` after filenames.
2019-09-17 13:49:26 -07:00
Easwar Swaminathan 6c2b3b1ba4
Add a micro benchmark for context.WithValue() to compare using local and (#2986)
global keys.
2019-09-03 10:43:58 -07:00
Easwar Swaminathan 6fb38bdee1
Fix a bug in benchmark code. (#2989)
Total number of Allocs and AllocedBytes retrieved from
runtime.Memstats() were not being divided by the number of completed
operations during the benchmark run, to get the correct number of
Allocs/op and Bytes/op.
2019-08-21 15:24:29 -07:00
Easwar Swaminathan b681a11d08
A few more improvements to the benchmark code. (#2840)
* 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.
2019-06-10 09:53:35 -07:00
Can Guler c2e0a6d772
Fix a typo. (#2826) 2019-05-21 11:09:30 -07:00
Easwar Swaminathan 7c03793042 benchmark: refactor the benchmark code. (#2820)
benchmark: refactor the benchmark code.
2019-05-20 16:01:37 -07:00
Menghan Li 4a199db194
xds: split proto imports for message and service (#2812) 2019-05-14 15:15:08 -07:00
Menghan Li 9949ee0c45
xds: lrs load store (#2779) 2019-05-07 10:06:40 -07:00
Prannay Khosla 8260df7a61 grpc: implementation of PreparedMsg API
grpc: implementation of PreparedMsg API
2019-04-19 14:08:08 -07:00
yangdihangN 22c2121b7d benchmark: exit after printing help when using `-h` (#2701) 2019-03-21 12:04:35 -07:00
Menghan Li 40cb5618f4
dialOption: export WithContextDialer() (#2629)
fixes #2627
2019-02-25 15:22:10 -08:00
Zuhayr Elahi b86a9dbd22 documentation: Adds package level comments (#2612)
* ADDED package level comments for: benchmark/, examples/helloworld/

* UPDATED code to run gofmt

* FIXED linter errors

* FIXED spelling error

* FIXED documentation based on feedback

* FIXED comment to add pointer to another file

* ADDED reference to start server

* ADDED fix to include command to start server
2019-02-21 13:05:00 -08:00
Can Guler 954fe27324
benchmark: Unconstrained streaming benchmark (#2512)
* Adds unconstrained streaming benchmarks.
* Adds throughput to all scenarios.
* Adds comment to exported function.
* Adds comment to the new rpc.
* Adds a new run mode for unconstrained benchmarks.
* Converts counters to uint64s.
* Decreases default warm up time.
* Addresses PR comments.
* Deletes an unnecessary select/case
* Explains the use of RecvMsg rather than Recv.
2019-01-11 17:37:31 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Doug Fawley 59a2cfbdf9
Remove support for Go1.6-1.8 (#2428) 2018-11-01 15:43:42 -07:00
dfawley 90f728eaf7
Remove shadowing of built-ins (#2290) 2018-09-05 09:05:40 -07:00
lyuxuan da7e20b83e
channelz: turn on channelz when importing service package, delete RegisterChannelz from grpc package (#2277) 2018-08-29 11:01:36 -07:00
lyuxuan 8e36593ad9 go generate: update proto files (#2236) 2018-07-25 11:40:12 -07:00
lyuxuan 8c15646409
Benchmark: fix build tags (#2099) 2018-07-12 13:06:42 -07:00
Menghan Li 39a411827d
internal: Update proto generated code (#2133) 2018-06-08 17:54:26 -07:00
mmukhi dea4e57312
Benchmarks that runs server and client and separate processes. (#1952) 2018-05-21 16:00:01 -07:00
Menghan Li f669235193
internal: update proto generated code (#2093) 2018-05-21 09:59:26 -07:00
Menghan Li 161c19534c
benchmark: listen on all addresses in benchmark servers (#2073) 2018-05-14 17:26:00 -07:00
lyuxuan a36eb4675a
regenerate *.pb.go files due to proto-gen-go update (#2070) 2018-05-11 18:57:54 -07:00
Chyroc f8dbc38bdc Fix "deprecated" function godoc comments to match standard formatting (#2027) 2018-05-02 08:52:49 -07:00
Menghan Li e538e04cad proto: update generated code (#2039) 2018-05-01 12:53:20 -07:00
lyuxuan 4166ea7dad
Stage 2: Channelz metric collection (#1909) 2018-04-23 11:22:25 -07:00
Karsten Weiss 7de9139327 Fix typos (#1994) 2018-04-16 10:03:02 -07:00
Karsten Weiss 4d9544a0fd Simplify make() (gosimple)
This fixes:
benchmark/worker/benchmark_client.go:151:36: should use make([]*grpc.ClientConn, connCount) instead (S1019)
benchmark/worker/benchmark_client.go:231:47: should use make([]lockingHistogram, rpcCountPerConn * len(conns)) instead (S1019)
benchmark/worker/benchmark_client.go:343:39: should use make([]*stats.Histogram, len(bc.lockingHistograms)) instead (S1019)
benchmark/worker/benchmark_client.go:369:22: should use make([]uint32, len(mergedHistogram.Buckets)) instead (S1019)
encoding/encoding.go:85:47: should use make(map[string]Codec) instead (S1019)
proxy_test.go:116:26: should use make([]byte, len(msg)) instead (S1019)
2018-04-15 15:32:33 +02:00
Karsten Weiss 749a0db289 Use time.Since() helper function (gosimple)
(I've dropped similar gosimple cleanups using time.Until() as this API is not
available in go1.6 and go1.7)
2018-04-15 15:32:33 +02:00
Karsten Weiss 95bbf69653 Remove redundant return statements (gosimple)
This fixes:
balancer/base/balancer.go:149:2: redundant return statement (S1023)
balancer_v1_wrapper.go:260:2: redundant return statement (S1023)
balancer_v1_wrapper.go:273:2: redundant return statement (S1023)
balancer_v1_wrapper.go:285:2: redundant return statement (S1023)
benchmark/benchmark.go:68:2: redundant return statement (S1023)
clientconn.go:1461:2: redundant return statement (S1023)
grpclb.go:223:2: redundant return statement (S1023)
grpclb.go:260:2: redundant return statement (S1023)
grpclb_util.go:201:2: redundant return statement (S1023)
rpc_util.go:278:50: redundant return statement (S1023)
rpc_util.go:296:56: redundant return statement (S1023)
rpc_util.go:314:56: redundant return statement (S1023)
rpc_util.go:333:53: redundant return statement (S1023)
rpc_util.go:354:52: redundant return statement (S1023)
rpc_util.go:387:56: redundant return statement (S1023)
rpc_util.go:416:53: redundant return statement (S1023)
stream.go:651:2: redundant return statement (S1023)
2018-04-15 12:43:34 +02:00
Jean de Klerk 2759199bf7 Small spelling fixes (unknow -> unknown) (#1868) 2018-02-22 13:10:19 -08:00
dfawley 46fd263cc8
benchmarks: add flag to benchmain to use bufconn instead of network (#1837)
This will allow us to focus on grpc internals in profiling by excluding the cost of syscalls, which is a significant part of our time spent.
2018-02-15 14:52:38 -08:00
dfawley 5ba054bf37
encoding: Introduce new method for registering and choosing codecs (#1813) 2018-01-23 11:39:40 -08:00
lyuxuan 4f7a2c71d3
compare atomic and mutex performance in case of contention. (#1788) 2018-01-22 18:48:20 -08:00
lyuxuan 17c6e90cd5
compare atomic and mutex performance for incrementing/storing one variable (#1757) 2018-01-02 10:46:13 -08:00
Menghan Li b7dc71e7ea
Optimize codes.String() method using a switch instead of a slice of indexes (#1712) 2017-12-06 10:50:43 -08:00
dfawley abd3e10d78
Add context benchmarks (#1610) 2017-11-07 10:20:24 -08:00