Commit Graph

111 Commits

Author SHA1 Message Date
Craig Tiller 3b21f2cac5 [memory-usage] Track memory usage for chaotic-good (#36863)
Built on #36862 which should be merged first.

Closes #36863

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36863 from ctiller:cgmem 9d45ced0b6f6b23ccb38974e139f6ba4315651a0
PiperOrigin-RevId: 644219306
2024-06-17 20:08:22 -07:00
Tanvi Jagtap 8881bde311 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36701)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log
In this CL we are migrating from gRPCs own gpr logging mechanism to absl logging mechanism. The intention is to deprecate gpr_log in the future.

We have the following mapping

1. gpr_log(GPR_INFO,...) -> LOG(INFO)
2. gpr_log(GPR_ERROR,...) -> LOG(ERROR)
3. gpr_log(GPR_DEBUG,...) -> VLOG(2)

Reviewers need to check :

1. If the above mapping is correct.
2. The content of the log is as before.
gpr_log format strings did not use string_view or std::string . absl LOG accepts these. So there will be some elimination of string_view and std::string related conversions. This is expected.

Closes #36701

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36701 from tanvi-jagtap:test_core_gpr_log 1d8c69e9c63faf384052621e172232776bb8f986
PiperOrigin-RevId: 636850577
2024-05-24 03:01:38 -07:00
Mark D. Roth 58a4b9c922 [reorg] move src/core/lib/gpr -> src/core/util (#36543)
Closes #36543

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36543 from markdroth:reorg_util_gpr ba84e186beb1ec50d09bcf91ebd16e88b8e225aa
PiperOrigin-RevId: 634113744
2024-05-15 16:32:20 -07:00
Tanvi Jagtap ef322d93c4 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - BUILD (#36605)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - BUILD
In this CL we are just editing the build and bzl files to add dependencies.
This is done to prevent merge conflict and constantly having to re-make the make files using generate_projects.sh for each set of changes.

Closes #36605

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36605 from tanvi-jagtap:build_test_core_misc_02 f928eb19de1d04445cebd16bd6d377cc6a2358a2
PiperOrigin-RevId: 633516934
2024-05-14 03:19:26 -07:00
Tanvi Jagtap b90be935af [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36595)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log
In this CL we are migrating from gRPCs own gpr logging mechanism to absl logging mechanism. The intention is to deprecate gpr_log in the future.
We have the following mapping
1. gpr_log(GPR_INFO,...) -> LOG(INFO)
2. gpr_log(GPR_ERROR,...) -> LOG(ERROR)
3. gpr_log(GPR_DEBUG,...) -> VLOG(2)
Reviewers need to check :
1. If the above mapping is correct.
2. The content of the log is as before.
gpr_log format strings did not use string_view or std::string . absl LOG accepts these. So there will be some elimination of string_view and std::string related conversions. This is expected.

Closes #36595

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36595 from tanvi-jagtap:regex_test_core_iomgr_transport b0836fda1c2aca0993891e0739ae99e7843fb767
PiperOrigin-RevId: 633456839
2024-05-13 23:48:00 -07:00
Mark D. Roth 32e03171e7 [reorg] move xds code to src/core/xds (#36521)
Also do some cleanup in CODEOWNERS.

Closes #36521

PiperOrigin-RevId: 631137895
2024-05-06 11:57:32 -07:00
Mark D. Roth 0944410d6c [reorg] move test/core/util -> test/core/test_util (#36446)
Closes #36446

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36446 from markdroth:reorg_test 5dcc85e006581a8fc52a3a914baa5f33e4a21589
PiperOrigin-RevId: 629229220
2024-04-29 17:06:40 -07:00
Tanvi Jagtap 04dc9b1da0 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36440)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

These changes have been made using string replacement and regex.

Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.

Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

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.

-->

Closes #36440

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36440 from tanvi-jagtap:tjagtap_iomgr_memory_usage a56570338e308e9bfcd9f16c265074e777c9d6e9
PiperOrigin-RevId: 628276606
2024-04-25 20:35:14 -07:00
AJ Heller 1a8b22f2de [build] Restrict visibility for creating core credentials types. (#36216)
Closes #36216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36216 from drfloob:conceal-core-cred-creation a44a2992736c2c45c044452ec892e6ac4d173b7b
PiperOrigin-RevId: 625425746
2024-04-17 01:21:29 +00:00
Eugene Ostroukhov 57ff0b890f [xds] Support for multiple servers in the bootstrap.json (#36021)
Closes #36021

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36021 from eugeneo:tasks/multiple-servers-bootstrap 8ebf7e1c064f2d5215f967d47cc1493cbbf12049
PiperOrigin-RevId: 615150672
2024-03-12 13:24:08 -07:00
Mark D. Roth c5c46a1640 [memory test] add benchmark for xDS channel with multiple addresses (#34902)
The plumbing is a little messy here, but I didn't see an obvious way to
improve it without a lot of work.
2023-11-09 07:25:44 -08:00
Mark D. Roth e8f2e27b2c [memory test] reland: add benchmarks with xDS enabled (#34820)
Relands #34785, which was reverted in #34818.

The first commit is the revert. The second commit removes the gtest
dependency from the xds_server library, which should address the
testonly problem internally.
2023-10-31 12:56:40 -07:00
Mark D. Roth b1901eb732 Revert "[memory test] add benchmarks with xDS enabled" (#34818)
Reverts grpc/grpc#34785
2023-10-27 15:25:43 -07:00
Mark D. Roth e0a5190a5e [memory test] add benchmarks with xDS enabled (#34785)
Initial results:

```
default: call/client: 15038.38208
default: call/server: 12873.64608
default: call/xds_client: 15850.04544
default: call/xds_server: 13177.15968
default: channel/client: 27747.9424
default: channel/server: 19939.328
default: channel/xds_client: 45272.2688
default: channel/xds_server: 20805.632
```

b/297028827
2023-10-27 13:52:05 -07:00
Yijie Ma bae0c705aa [Deps] Update to Clang-16 (#34492)
<!--

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-10-11 16:26:32 -07:00
Mario Jones Vimal 1c0f5d32a0 [core/gpr] Move subprocess to gpr and add subprocess creation using execve (#33983)
Move subprocess util to gpr.
Add support for communication with the subprocess.
This is required to support authentication using an executable.
2023-08-07 12:53:00 -07:00
Craig Tiller 5325b65d84 Revert "[core/gpr] move subprocess to gpr" (#33972)
Reverts grpc/grpc#33870 - since it breaks memory usage tooling.
2023-08-02 20:40:12 -07:00
Mario Jones Vimal f10a8e3418 [core/gpr] move subprocess to gpr (#33870)
Move subprocess util to gpr.
Add support for communication with the subprocess.
This is required to support authentication using an executable.
2023-08-02 13:19:08 -07:00
Craig Tiller 3717ff04ba [chttp2] Split ping policy from transport (#33703)
Why: Cleanup for chttp2_transport ahead of promise conversion - lots of
logic has become interleaved throughout chttp2, so some effort to
isolate logic out is warranted ahead of that conversion.

What: Split configuration and policy tracking for each of ping rate
throttling and abuse detection into their own modules. Add tests for
them.

Incidentally: Split channel args into their own header so that we can
split the policy stuff into separate build targets.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-26 09:19:35 -07:00
Craig Tiller c32cbb57df [memory_usage] Use a named target for the client (#33258)
Allows usage on machines that don't support ipv4.

<!--

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-05-26 10:28:18 -07:00
Craig Tiller a95e54d3d8 [memory-usage] remove testonly bit from memory_usage tests (#33231)
Allow usage in production tasks

<!--

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-05-24 14:49:23 -07:00
Craig Tiller 4303a67e8b [memory-usage] Propagate experiments through memory-usage test to client/server (#33206)
Will be used to evaluate experiment effects on memory usage once they're
toggled on.

<!--

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-05-22 11:46:00 -07:00
Yash Tibrewal aa11978541 Fix include guards for src/ and test/ directories (#32167)
* Fix include guards for src/ and test/ directories

* Sanity

* Update new files
2023-01-20 16:27:27 -08: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
Cheng-Yu Chung b887534111 [cleanups] Remove include/grpc/impl/codegen/propagation_bits.h (#31870)
* Remove `include/grpc/impl/codegen/propagation_bits.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-12-15 11:08:02 +08:00
Cheng-Yu Chung 77b3972f95 Clean up the TODO item in build target grpc_base part channel_args (#31642)
* Clean up the TODO item in build target `grpc_base` part `channel_args`

* Update

* Update

* Update

* Automated change: Fix sanity tests

* update

* Automated change: Fix sanity tests
2022-11-23 16:01:34 -05:00
Craig Tiller d410f1d0aa [surface] Ensure SEND_STATUS & RECV_MESSAGE do not inhabit the same batch (#31554)
Add a check that SEND_STATUS_FROM_SERVER and RECV_MESSAGE are not in the same batch.

This is necessary pre-work for #31204 and implements part of grpc/proposal#336.

Also eliminates fling instead of updating it:

My expectation is nobody has looked at this corner in many years
It's not a benchmark we want: concentrating on a microbenchmark that doesn't include a binding layer caused us to favor designs that emphasized a lightweight core at the expense of a expensive bindings. We should consider the whole.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-11 14:18:29 -08:00
Craig Tiller d9ac89a441 [gprpp] absl::Notification polyfill (#31008)
* [gprpp] absl::Notification polyfill

* grpc_core::

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-16 09:06:03 -07:00
Esun Kim 888c64adf8 Fix the build script (#30985)
* Fix the build script

* Set -ex

* fix unsigned int comparisons and ignored return values

Co-authored-by: AJ Heller <hork@google.com>
2022-09-14 15:36:55 -07:00
Cheng-Yu Chung 779419505f Replace absl::exchange() with std::exchange() (#30802)
* Replace `absl::exchange()` with `std::exchange()`

* Update `core_banned_functions.py`
2022-08-31 14:33:56 -04:00
Craig Tiller 622dd886e6 Update flaky tests list (#30771)
* Update flaky tests list

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-30 21:42:59 -07:00
Craig Tiller f573fd44f9 [test] Semi-automatic flaky test tracking (#30638)
* [test] Semi-automatic flaky test tracking

* fix

* Automated change: Fix sanity tests

* Update update_flakes.py

* fix formatting

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-19 16:22:31 -07:00
nancylucy01 cc96858f0b Add channel memory benchmark into memory_diff.py (#30507)
* Added the channel benchmark to the python script

* removing warning

* Automated change: Fix sanity tests

* added label function for channel and skip for minstack channel

* Automated change: Fix sanity tests

Co-authored-by: nancylucy01 <nancylucy01@users.noreply.github.com>
2022-08-05 09:24:24 -07:00
nancylucy01 2284be0cdd Create multiple channels in per channel memory benchmark (#30441)
* Added new files for channel client/server

* Committing to switch branch

* Rebasing branch

* Switching branch

* Server process getting called

* Still working

* RPC received success, with sleep

* gRPC Receive success, grpc timeout

* Earlier but Clang tidy

* Fix timeout issue, remove some logs

* Added signint handler, test passing but flaky

* added sleep to reduce flakiness, removed some dependencies, changed LOG to gpr_log

* Changed benchmark_name default back to call

* remove deleted files

* grpc shutdown timeout

* trying to add shutdown

* Some changes

* Removed shutdown

* Automated change: Fix sanity tests

* Changes for review comments

* Changed comments

* Changed benchmark driver defaults so that CI testing would happen for all benchmarks

* Get server memory using RPC

* Add PID method to get memory

* Added gpr_subprocess_get_process_id to windows

* Removed GetAfterSnapshot since theres a not RPC method to get memory

* Automated change: Fix sanity tests

* Changed benchmark driver defaults so that CI testing would happen for all benchmarks

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Forgot semicolon

* Fix includes

* Automated change: Fix sanity tests

* Added GetMemUsage and changed Snapshot and callback server and client to call it

* Moved GetMemUsage from header file

* removed some unnecessary includes

* Automated change: Fix sanity tests

* Updating build file

* forgot a comma

* Added tags to BUILD for memstats

* Automated change: Fix sanity tests

* Switching branches

* Changed channel creation and GetBeforeSnapshot

* Switching branches

* Intermediate commit

* Revert merge commit

* Fixed merge issues

* Automated change: Fix sanity tests

* Changes to fix asan failures

* Automated change: Fix sanity tests

* Fix comment

Co-authored-by: nancylucy01 <nancylucy01@users.noreply.github.com>
2022-08-03 09:42:12 -07:00
nancylucy01 57e06148e5 Fix to #30390 Adding methods to get memory usage of server for the perchannel benchmark (#30435)
* Revert "Revert "Adding methods to get memory usage of server for the perchannel benchmark (#30390)" (#30433)"

This reverts commit 3fe438b55a.

* Made all variables used
2022-07-28 16:13:56 -07:00
Craig Tiller 3fe438b55a Revert "Adding methods to get memory usage of server for the perchannel benchmark (#30390)" (#30433)
This reverts commit fcdea5afcd.
2022-07-28 13:26:34 -07:00
nancylucy01 fcdea5afcd Adding methods to get memory usage of server for the perchannel benchmark (#30390)
* Added new files for channel client/server

* Committing to switch branch

* Rebasing branch

* Switching branch

* Server process getting called

* Still working

* RPC received success, with sleep

* gRPC Receive success, grpc timeout

* Earlier but Clang tidy

* Fix timeout issue, remove some logs

* Added signint handler, test passing but flaky

* added sleep to reduce flakiness, removed some dependencies, changed LOG to gpr_log

* Changed benchmark_name default back to call

* remove deleted files

* grpc shutdown timeout

* trying to add shutdown

* Some changes

* Removed shutdown

* Automated change: Fix sanity tests

* Changes for review comments

* Changed comments

* Changed benchmark driver defaults so that CI testing would happen for all benchmarks

* Get server memory using RPC

* Add PID method to get memory

* Added gpr_subprocess_get_process_id to windows

* Removed GetAfterSnapshot since theres a not RPC method to get memory

* Automated change: Fix sanity tests

* Changed benchmark driver defaults so that CI testing would happen for all benchmarks

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Forgot semicolon

* Fix includes

* Automated change: Fix sanity tests

* Added GetMemUsage and changed Snapshot and callback server and client to call it

* Moved GetMemUsage from header file

* removed some unnecessary includes

* Automated change: Fix sanity tests

* Updating build file

* forgot a comma

* Added tags to BUILD for memstats

* Automated change: Fix sanity tests

Co-authored-by: nancylucy01 <nancylucy01@users.noreply.github.com>
2022-07-28 10:40:35 -07:00
Craig Tiller 9511ab003a [iwyu] Add test/core/memory_usage (#30408)
* include-fix

* include-fix

* iwyu headers

* clang-fmt

* fix
2022-07-25 23:32:25 -07:00
Craig Tiller 05e6bf2e4a [build] Add test/core/util, test/core/event_engine to auto build deps (#30364)
* [build] Add test/core/util, test/core/event_engine to auto build deps

* deal with suppressions

* fix suppressions

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* progress

* Automated change: Fix sanity tests

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-25 21:59:25 -07:00
nancylucy01 3cd368b28d Basic callback client and server for new perchannel benchmark (#30305)
* Added new files for channel client/server

* Committing to switch branch

* Rebasing branch

* Switching branch

* Server process getting called

* Still working

* RPC received success, with sleep

* gRPC Receive success, grpc timeout

* Earlier but Clang tidy

* Fix timeout issue, remove some logs

* Added signint handler, test passing but flaky

* added sleep to reduce flakiness, removed some dependencies, changed LOG to gpr_log

* Changed benchmark_name default back to call

* remove deleted files

* grpc shutdown timeout

* trying to add shutdown

* Some changes

* Removed shutdown

* Automated change: Fix sanity tests

* Changes for review comments

* Changed comments

* Changed benchmark driver defaults so that CI testing would happen for all benchmarks

* Automated change: Fix sanity tests

Co-authored-by: nancylucy01 <nancylucy01@users.noreply.github.com>
2022-07-25 10:04:29 -07:00
nancylucy01 24171b3b57 Changing memory benchmark driver's flags (#30276)
* Changed benchmark driver's flags and updated calling python script. Untested

* Changes made for debugging/testing

* Switching branch

* Removed debug statements and changed file permissions for memory_diff

* Minor changes for review

* Changed secure description

* Changed flag configuration for clarity

* Added dep to BUILD file

* Changed return value

* Edits for review, added comments

* Changed a print statement
2022-07-13 10:10:25 -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
Craig Tiller bf72db4180 Collect memory measurements of the minimal stack (#29164)
* minstack measuring

* fix

* sort

* x

* x

* x

* x

* Automated change: Fix sanity tests

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-25 10:09:46 -07:00
Craig Tiller 7c74d58cbe Disable memory_usage test on cmake builds (#28948) 2022-02-23 17:21:55 +01:00
Craig Tiller ff87ca02b2 Revive test/core/memory_usage (#28931)
* Revert "Deprecate gpr_get/set_allocation_functions"

This reverts commit 81df105ac8.

* memory stats

* Hack up to get per-call numbers

* expunge memory counters

* buildgen

* Automated change: Fix sanity tests

* sanity

* fix

* Automated change: Fix sanity tests

* simplify

* better

* Automated change: Fix sanity tests

* Disable windows memory_usage

* disable mac

* disable mac

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-02-22 15:39:40 -08:00
Esun Kim 81df105ac8 Deprecate gpr_get/set_allocation_functions 2019-11-04 19:47:33 -08:00
Vijay Pai 8ff71276f5 Remove unused parameter warning (11 of 20) 2019-10-17 08:51:29 -07:00
tanjunchen 64cdea5a07 fix some spelling mistakes in document 2019-10-04 09:07:35 +08:00
Jan Tattermusch 0f50bf0150 temporarily disable memory usage test on windows 2019-09-30 13:28:00 +02:00
Jan Tattermusch 6ebc1c616f set uses_polling=False for some bazel tests 2019-09-24 09:50:00 +02:00