Commit Graph

44 Commits

Author SHA1 Message Date
Craig Tiller 9128604b03
[stats] Add a test for IncrementHttp2MetadataSize(0) (#32896)
This test proves that `global_stats.IncrementHttp2MetadataSize(0)` works

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-04-19 08:37:53 -07:00
Yijie Ma f99b8b5bc4
Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Craig Tiller 20d1efc38a
[stats] Move core stats to C++ (#30936)
* begin c++

* Automated change: Fix sanity tests

* progress

* progress

* missing-files

* Automated change: Fix sanity tests

* moved-from-stats

* remove old benchmark cruft, get tests compiling

* iwyu

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* add needed constructor

* Automated change: Fix sanity tests

* iwyu

* fix

* fix?

* fix

* fix

* Remove ResetDefaultEventEngine

Now that it is a weak_ptr, there's no need to explicitly reset it. When
the tracked shared_ptr is deleted, the weak_ptr will fail to lock, and a
new default EventEngine will be created.

* forget existing engine with FactoryReset

* add visibility

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: AJ Heller <hork@google.com>
2022-10-09 21:22:08 -07:00
Craig Tiller 8174a75079
[iwyu] Add more test directories (#30952)
* [iwyu] Add more test directories

* fix

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* iwyu

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-29 06:47:07 -07:00
Craig Tiller 610a248059
[stats] Optimize histogram system (#30834)
* recurse

* bsearch

* bounds

* optimize stats

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-08 13:30:28 -07:00
Craig Tiller c3c4159d24
[build] Make stats test drastically faster under tsan (#30712)
* [fixit] Make stats test drastically faster under tsan

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-01 19:57:10 -07:00
Craig Tiller 5b6dac02ac
[stats] Cleanup & re-enable stats system (#30610)
* [stats] Cleanup stats system

* clear out optionality

* fix

* might as well...

* Automated change: Fix sanity tests

* clean out more unused stuff

* clean out more unused stuff

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-26 10:18:06 -07:00
Craig Tiller a1dc97e9df
[fixit] Annotate stats_test cpu requirements (#30693)
* fix

* Update BUILD
2022-08-22 12:14:59 -07:00
AJ Heller fa5e9ee067
Fix internal test timeouts (#29564)
This has timed out 3% of the time in the last week. Automatically
identified, ported manually.
2022-05-03 10:49:13 -07:00
AJ Heller 18a8f6aad9
Refactor end2end tests to exercise each EventEngine (#29202)
* Refactor end2end tests to exercise each EventEngine

* fix incorrect bazel_only exclusions

* Automated change: Fix sanity tests

* microbenchmark fix

* sanitize, fix iOS flub

* Automated change: Fix sanity tests

* iOS fix

* reviewer feedback

* first pass at excluding EventEngine test expansion

Also caught a few cases where we should not test pollers, but should
test all engines. And two cases where we likely shouldn't be testing
either product.

* end2end fuzzers to be fuzzed differently via EventEngine.

* sanitize

* reviewer feedback

* remove misleading comment

* reviewer feedback: comments

* EE test_init needs to play with our build system

* fix golden file test runner

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-03-30 15:43:05 -07:00
Richard Belleville 468768865b
Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Craig Tiller d1e01ac139
Add a test for a (now-illegal) build file construct (#27602)
* Add a test for a (now-illegal) build file construct

* add to test suite!

* fix

* fix

* fix syntax
2021-10-06 07:43:59 -07:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Esun Kim 62ac3f075a Added call to grpc::testing::TestEnvironment in tests 2020-07-01 11:37:57 -07:00
Lidi Zheng c34bef4ca4 Format all Bazel files with buildifier 2019-11-05 14:03:52 -08:00
Vijay Pai 9d96158d7e Remove unused-parameter warnings, round 2 (15 of 19) 2019-10-21 09:16:34 -07:00
Jan Tattermusch 24b529e408
Merge pull request #20343 from jtattermusch/bazel_tests_uses_polling
Set "uses_polling" arg for bazel tests
2019-09-30 08:13:31 +02:00
Vijay Pai 5d7e4bb301 Stop using deprecated gtest macros 2019-09-24 14:56:41 -07:00
Jan Tattermusch 6ebc1c616f set uses_polling=False for some bazel tests 2019-09-24 09:50:00 +02:00
yang-g 67742ef63f Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
Yash Tibrewal 617f90aaae Add BUILD file for stats_test.cc 2018-11-05 16:19:18 -08:00
Yash Tibrewal 519d2b1fae Cleanup stats removal for opt build. Stats will only be collected on debug builds or if GRPC_COLLECT_STATS is defined. 2018-05-14 15:17:43 -07:00
Vijay Pai 2f4161c210 Use stack frame size limits for consistency with internal builds 2018-03-05 16:43:32 -08:00
Yash Tibrewal 8cf1470a51
Revert "Revert "All instances of exec_ctx being passed around in src/core removed"" 2017-12-06 09:47:54 -08:00
Yash Tibrewal ad4d2dde00
Revert "All instances of exec_ctx being passed around in src/core removed" 2017-12-06 09:05:05 -08:00
Yash Tibrewal c354269ba7 Remove _ prefixed variable names 2017-11-29 19:07:44 -08:00
Yash Tibrewal 177039b2f8 Merge master 2017-11-16 19:31:28 -08:00
Yash Tibrewal 6c26b16fe0 Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes 2017-11-14 18:11:22 -08:00
Yash Tibrewal 75122c2357 Address some PR comments 2017-11-14 01:36:28 -08:00
Jan Tattermusch 5b2c12e0c2 make stats_test skip values far from boundaries 2017-11-13 18:22:40 +01:00
Yash Tibrewal 0032548674 Correction to closure.cc,bm_chttp2_hpack and few more 2017-11-10 10:48:15 -08:00
Yash Tibrewal 4e9265c828 Merge with master 2017-11-09 17:46:29 -08:00
Yash Tibrewal 40422d5fa6 Merge master 2017-11-06 14:43:31 -08:00
Craig Tiller baa14a975e Update clang-format to 5.0 2017-11-03 09:09:36 -07:00
Yash Tibrewal 39aed1ae8b Remove unnecessary extern Cs 2017-10-25 17:04:35 -07:00
Yash Tibrewal 0ee7574732 Removing instances of exec_ctx being passed around in functions in
src/core. exec_ctx is now a thread_local pointer of type ExecCtx instead of
grpc_exec_ctx which is initialized whenever ExecCtx is instantiated. ExecCtx
also keeps track of the previous exec_ctx so that nesting of exec_ctx is
allowed. This means that there is only one exec_ctx being used at any
time. Also, grpc_exec_ctx_finish is called in the destructor of the
object, and the previous exec_ctx is restored to avoid breaking current
functionality. The code still explicitly calls grpc_exec_ctx_finish
because removing all such instances causes the code to break.
2017-10-18 17:12:19 -07:00
Craig Tiller f0a2412338 clang-format 2017-10-07 22:15:41 -07:00
Craig Tiller 3cf8d50d1e accurate, exhaustive "fast" version of this test 2017-10-08 05:11:15 +00:00
Craig Tiller c5fb7e5b73 Use a mutex for an exact test 2017-10-08 03:25:31 +00:00
Craig Tiller 8d4d52d396 Multithread & shard stats test, make it exhaustive 2017-10-07 17:28:58 -07:00
Craig Tiller e5a1b2b087 clang-format 2017-09-07 12:20:12 -07:00
Craig Tiller 3e3dd08087 Bounds fixes 2017-09-05 15:08:39 -07:00
Craig Tiller 83db6312c6 Optimize test 2017-09-05 12:10:18 -07:00
Craig Tiller 97ec5eb61e Add stats test 2017-09-01 12:57:36 -07:00