14 Commits

Author SHA1 Message Date
Craig Tiller
e601b6caa2 [memory-diff] Increase threshold for call memory increased/decreased (#38674)
Noise is currently higher than our detection threshold.

Closes #38674

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38674 from ctiller:limits 9d3f4901e4a3d261fb121f5f22ecf60431e29cca
PiperOrigin-RevId: 722842062
2025-02-03 16:33:49 -08:00
Craig Tiller
914461700a [memory-diff] Improve algorithm (#38447)
We used to use a thresholded sum of differences to determine significance of benchmark results. This is significantly flawed, especially when adding new checks - the significance threshold must also be updated, but it's unclear exactly how.

This new approach relies on counting the number of significant increases/decreases across the benchmarks, and then reporting based on how we should react: increases are biased towards (let's not increase memory blindly!), then decreases (huzzah, go collect your bonus!), then neutral changes.

Closes #38447

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38447 from ctiller:diffy 7c846eaf55cdbd23aafac75d6e2e169f846557ce
PiperOrigin-RevId: 715951309
2025-01-15 14:42:17 -08:00
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
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
Sergii Tkachenko
de6ed9ba9f [Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
nancylucy01
45460e1f87 Fix per call label (#30515) 2022-08-05 12:38:39 -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
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
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
5d81683faa Add per-call memory bloat report to CI (#29037)
* Add per-call memory bloat report to CI

* fix

* test

* Automated change: Fix sanity tests

* Update grpc_bloat_diff_in_docker.sh

* Update memory_diff.py

* review feedback

* prep for new job

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-12 11:56:48 +01:00