Commit Graph

226 Commits

Author SHA1 Message Date
Richard Belleville b6cc72f129
Revert "Run 2to3 on tools directory (#26002)" (#27183)
This reverts commit a388361c3d.
2021-08-30 12:29:20 -07:00
Richard Belleville a388361c3d
Run 2to3 on tools directory (#26002)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Restore line_count directory
2021-08-30 09:25:21 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
AJ Heller 4ea47d6ae3
Fix python3 performance tests - incomplete migration from python2 (#25734)
This fixes a crash in the grpc_performance_profile_* and grpc_e2e_performance_* tests.

Example failure: https://source.cloud.google.com/results/invocations/2112f2d5-db91-4901-87cb-cc9865f351f1/targets

The daily performance test passes with this fixit branch:
http://sponge2/23d4df20-f4dd-48ee-8789-4cd96b078ed5.

Additional fixes:

reorder imports according to the google style guide
replace deprecated cgi.escape library method with html.escape
In case it comes up, with respect to upgrading from py2 to py3, the iter{items,keys,values} methods are intentionally replaced with the less-efficient-in-python2 non-iter versions. This is a recommended practice even when supporting both python versions, and this is not performance-critical code.

Additional note: there is no performance difference btw py2 and py3 (~80 minutes to finish)
2021-03-16 16:49:30 -07:00
AJ Heller 5139a012e7
Migrate the bm_diff benchmarks to python3 (#25619)
* Migrate the bm_diff benchmarks to python3

Includes a requirements.txt pinned at ~2017 versions, when this script
was first written.

* Replace p2 with p3 scipy/numpy dependencies.

* py2->3 for benchmark setup scripts

* upgrade pip to resolve python3 cryptography/setuptools-rust problem

* re-add jobset import (accidentally removed)

* re-add six's urllib import. This file is still used in py2 tests

* force py3 in run_if_c_cpp_modified.sh

* Fix another instance of subprocess.check_output binary mode

* Use the requirements.txt for CI perf environment setup

* Try to upgrade PyJWT. (v2.0.0 was problematic, #25053)

v2.x makes encode return strs from jwt.encode in both py2 and py3.
Previously, py3 would return bytes, and py2 a str.

* upgate cryptography lib version requirements for jwt.

* Wrap pip requirements specifier in quotes '>=x,<y'

* Decode subprocess output once instead of for every line

* Revert "Decode subprocess output once instead of for every line"

This reverts commit 28d14026431622ac7afd3535a8d7118e5be96628.

py2 doesn't support the `text` argument to subprocess.check_output.

* Address reviewer requests

* Pin a valid scipy version

* Remove scipy and tabulate dependencies from macos tests
2021-03-09 15:44:00 +01:00
Sergii Tkachenko 8db79e2e71 Python style: reformat code using updated yapf 0.30.0 2021-01-13 14:00:12 -05:00
Jan Tattermusch b4007c1cbc fix bloat_diff.py 2020-12-11 13:43:44 +01:00
Esun Kim bfdfc9eabc Python3 ios_bin/binary_size.py 2020-11-12 18:48:46 -08:00
Jan Tattermusch c81ebbd343 use bazel to build microbenchmarks in bm_build.py 2020-08-17 09:50:26 +02:00
Esun Kim 7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
apolcyn 8a2c9512a5
Merge pull request #20447 from apolcyn/fix_print
Put parenthesis around print in bm_main.py
2019-10-02 16:20:54 -07:00
Alexander Polcyn 76abd3dd03 Also fix exception syntax 2019-10-02 13:12:06 -07:00
Alexander Polcyn c6654fc02a Put parenthesis around print in bm_main.py 2019-10-02 12:06:03 -07:00
chentanjun 4ecc1fe6a4 fix the wrong word 2019-10-01 05:13:33 +08:00
Esun Kim f88bd06ee5 Go UPB! 2019-08-06 15:27:14 -07:00
Lidi Zheng 0f0822d53f WIP: Utilize the GitHub Check Feature 2018-12-13 16:40:47 -08:00
Muxi Yan 07f190d2d5 Fix binary_size.py 2018-08-07 17:03:25 -07:00
Muxi Yan e773a9b75f Use /tmpfs on Kokoro for ObjC tests 2018-07-27 14:09:24 -07:00
Muxi Yan 687316c025
Clarify it's Objective-C sizes in comment 2018-07-19 16:55:35 -07:00
Muxi Yan 4df5a4d384 yapf_code 2018-07-10 09:57:43 -07:00
Muxi Yan 252359bbdc CI integration 2018-07-10 09:53:51 -07:00
Muxi Yan eb22c792f2 Provide diff sign for each line 2018-06-07 15:47:14 -07:00
Muxi Yan 9ea0b9f836 Description fix 2018-06-06 14:40:44 -07:00
Muxi Yan a2da1d7b1b Scripts for iOS size audit 2018-06-05 14:19:48 -07:00
Noah Eisen b649422741
Merge pull request #15220 from ncteisen/microbenchmarks
Don't Use Benchmark Counters
2018-04-27 13:38:01 -07:00
ncteisen 99e910f58f Stop tracking call size in bm diff 2018-04-27 11:34:50 -07:00
Jan Tattermusch 746479ad80 fix performance profile jobs 2018-04-11 21:59:09 +02:00
Jan Tattermusch 9f40b5f293 further improve percentile() code 2018-03-22 17:35:28 +01:00
Jan Tattermusch 577e637920 reimplement percentile function 2018-03-22 13:43:41 +01:00
yang-g 20ea5b8066 Fix issues in latency parsing tool 2018-01-31 13:40:15 -08:00
Mehrdad Afshari 87cd994b04 Upgrade yapf to 0.20.0
Upgrade yapf version to 0.20.0 and reformat Python files.
2018-01-02 14:40:00 -08:00
ncteisen 173c477bd0 tools/profiling 2017-12-11 16:52:44 -08:00
ncteisen 4df6a64403 Change default bm_diff loops to 10 2017-11-06 15:46:37 -08:00
Ken Payson 667aa2b990 Add call size bm_diff 2017-10-27 14:33:17 -07:00
ncteisen 4c9fa854f6 Add debugging prints 2017-10-24 08:59:05 -07:00
ncteisen 6bf4bcef04 Fix bm_diff 2017-10-23 22:19:01 -07:00
Craig Tiller f734e732e3 Better output 2017-10-04 14:09:28 -07:00
Craig Tiller e3dbf766f8 Initial implementation of bloat_diff 2017-10-04 14:01:28 -07:00
ncteisen c2d5edfef5 Increase CPU cost 2017-09-28 19:20:02 -07:00
ncteisen 460af54440 Shuffle new and old jobs together 2017-09-28 16:12:15 -07:00
Craig Tiller 319652fa85 Track pings in bmdiff 2017-09-13 18:13:48 -07:00
Craig Tiller e6d2e8f16b Fix case on internal type names
Should allow microbenchmarks to get running again
2017-09-13 06:10:18 -07:00
Craig Tiller 54f3c2eefe Automatically fetch schema from BigQuery 2017-09-11 13:12:04 -07:00
ncteisen 2aab728245 regex to diff 2017-07-21 11:25:56 -07:00
ncteisen 5c92dcde1e Allow passing regex to bm_diff tools 2017-07-20 14:55:49 -07:00
ncteisen 741ffb4b46 Rename files 2017-06-20 14:33:15 -07:00
ncteisen 06795cb442 Address github comments 2017-06-20 08:58:43 -07:00
ncteisen 65fe1abed2 Address github comments 2017-06-19 14:31:04 -07:00
ncteisen 3345e1ccf7 Actually enable trickle diff 2017-06-19 09:47:58 -07:00
ncteisen 45e161b1c9 Make threshold toggleable 2017-06-19 09:27:59 -07:00