Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new python profiler for performance testing (#89)
*Description of changes:* Added a new profiler.py script that uses psutils to get per process info such as Network Bytes Sent/Received, CPU, Resident Memory (Phyical RAM used), virtual memory and the peak number of threads. Updated the persisters as well to read the new data and populate `summary.txt` and `results.csv` as expected. Below is an example from a test run. Also added a bunch of TODO comments to clean up old JFR logic that is no longer required here and to keep this PR changes to a minimum. ``` ---------------------------------------------------------- Run at Mon Mar 04 15:53:15 PST 2024 all-100-tps : Compares all DistroConfigs (100TPS test) 5 users, 10s duration ---------------------------------------------------------- DistroConfig : none app_signals_disabled app_signals_no_traces app_signals_traces Run duration : 00:00:19 00:00:15 00:00:21 00:00:17 Startup time (ms) : 4040 5051 5042 5058 Req. Count : 504.00 504.00 462.00 448.00 Req. Rate : 31.97 44.39 25.53 33.31 Req. Lat. mean (ms) : 113.25 106.52 130.56 121.27 Req. Lat. p0 (ms) : 1.56 2.11 2.09 2.07 Req. Lat. p50 (ms) : 54.95 56.82 56.22 56.85 Req. Lat. p90 (ms) : 336.17 340.21 353.73 350.77 Req. Lat. p99 (ms) : 420.83 429.16 441.63 458.23 Req. Lat. p100 (ms) : 5410.95 5436.79 10113.78 5405.26 Net Sent mean (B) : 47226.00 64212.00 39314.00 49675.00 Net Sent p0 (B) : 0.00 0.00 0.00 0.00 Net Sent p50 (B) : 62080.00 72615.00 29153.00 55584.00 Net Sent p90 (B) : 97788.00 104820.00 104455.00 87291.00 Net Sent p99 (B) : 107597.00 128103.00 112795.00 111525.00 Net Sent p100 (B) : 107597.00 128103.00 112795.00 111525.00 Net Recv mean (B) : 46004.00 58401.00 38055.00 45899.00 Net Recv p0 (B) : 0.00 0.00 0.00 0.00 Net Recv p50 (B) : 60268.00 70027.00 29353.00 55344.00 Net Recv p90 (B) : 94835.00 94095.00 102147.00 81180.00 Net Recv p99 (B) : 105284.00 101951.00 108862.00 107865.00 Net Recv p100 (B) : 105284.00 101951.00 108862.00 107865.00 CPU Usage mean % : 1.73 2.71 1.81 2.17 CPU Usage p0 % : 0.00 0.00 0.00 0.00 CPU Usage p50 % : 2.07 2.99 1.24 2.49 CPU Usage p90 % : 3.73 4.56 4.81 4.48 CPU Usage p99 % : 4.23 4.73 5.22 5.30 CPU Usage p100 % : 4.23 4.73 5.22 5.30 RSS Mem mean (MB) : 50.65 81.07 83.21 80.96 RSS Mem p0 (MB) : 49.78 78.30 79.71 79.33 RSS Mem p50 (MB) : 50.78 81.30 83.53 81.21 RSS Mem p90 (MB) : 50.91 82.17 83.53 81.58 RSS Mem p99 (MB) : 50.91 82.17 87.15 81.58 RSS Mem p100 (MB) : 50.91 82.17 87.15 81.58 VMS Mem mean (MB) : 445.26 2100.96 1928.66 2114.42 VMS Mem p0 (MB) : 203.14 1746.01 1601.97 1746.04 VMS Mem p50 (MB) : 491.16 2179.04 1962.99 2179.07 VMS Mem p90 (MB) : 491.16 2179.04 1962.99 2179.07 VMS Mem p99 (MB) : 491.16 2179.04 1964.99 2179.07 VMS Mem p100 (MB) : 491.16 2179.04 1964.99 2179.07 Peak threads : 7 29 27 29 ``` ### Testing ``` asakem@88665a24d661 performance-tests % ./gradlew test Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 15m 14s 3 actionable tasks: 2 executed, 1 up-to-date ``` By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information