[Perf] Enhance test.sh and perf_report.py to support multiple iterations.#85
[Perf] Enhance test.sh and perf_report.py to support multiple iterations.#85
Conversation
| FLD_AVG_ELAPSED_TIME_IDX = 5 | ||
| FLD_SERVER_THROUGHPUT_IDX = 6 | ||
| FLD_CLIENT_THROUGHPUT_IDX = 7 | ||
| FLD_AVG_OPS_PER_THREAD_IDX = 8 |
There was a problem hiding this comment.
New parsing interfaces to pluck metrics fields from comma-separated Summary: line in stdout.
| # Run through diff server-thread parameters, and generate report | ||
| # We make multiple passes extracing metrics for each combination | ||
| # of #-of-server-threads and run-types. | ||
| for threads in list_of_nthreads: |
There was a problem hiding this comment.
This new approach simplifies the post-processing.
We make multiple passes on the output lines, looking for lines of interest to consolidate and to generate aggregate metrics from.
| # using env-var as: | ||
| # | ||
| # SERVER_NUM_THREADS="1 2 4 8" ./test.sh run-all-client-server-perf-tests | ||
| # L3_PERF_SERVER_NUM_THREADS="1 2 4 8" ./test.sh run-all-client-server-perf-tests |
There was a problem hiding this comment.
Slight change in env-var: Use L3_PERF prefix, to namespace the env-vars used by this script.
gregthelaw
left a comment
There was a problem hiding this comment.
Disclaimer: I've only skimmed over this, but it all looks pretty useful / non-controversial.
|
|
||
| # Key: Run-type 'Baseline - No logging'; Value: [ <metrics> ] | ||
| metrics_by_run = OrderedDict() | ||
| # metrics_by_run = OrderedDict() |
There was a problem hiding this comment.
Is this deliberately committed?
There was a problem hiding this comment.
Don't recall. Cruft. Cleaned it up.
24847ed to
7e70955
Compare
…ons.
In previous performance test-runs, we were able to only run one iteration
of the client-server program for each run-type, test-parameter. We were
seeing some fluctuations and unexpected results in the comparison report.
This commit enhances the testing framework to:
a) Run 1 or more iterations of the client/server program
b) Extend the Python perf-comparison report generator to work
with another source of input metrics-line(s).
c) Comparison report generated using the median value of the
relevant metric across the n-iterations.
Note: (b) was needed as runs on AWS were aborted midway and had to
be partially re-run. We add Python parsing logic to extract out
and massage metrics from "Summary: " output lines, that the server
program emits to `stdout`. This expedited the report generation task
w/o having to re-run all perf-tests on AWS instances. This approach
re-casts the new summary data into an input format needed by the
existing report generation logic.
- To run multiple iterations, use env-var L3_PERF_TEST_NUM_ITERS=<n>
Workflow to run the enhanced perf_report.py:
- Run test.sh with diff server-threads and #iterations.
Example:
L3_PERF_TEST_NUM_ITERS=5 L3_PERF_SERVER_NUM_THREADS="1 2 4 8" ./test.sh --clock-default $((1000 * 1000))
- Redirect output to a /tmp/file: > /tmp/perf.out 2>&1
- grep 'Summary:' /tmp/perf.out > /tmp/perf.summary.out
- Feed the summary file to the Python tool using:
./scripts/perf_report.py --summary-file /tmp/perf.summary.out
- tests/pytests/perf_report_test.py:
- Add unit-test cases for new parsing methods added
7e70955 to
3460fd5
Compare
In previous performance test-runs, we were able to only run one iteration of the client-server program for each run-type, test-parameter. We were seeing some fluctuations and unexpected results in the comparison report.
This commit enhances the testing framework to:
a) Run 1 or more iterations of the client/server program
b) Extend the Python perf-comparison report generator to work
with another source of input metrics-line(s).
c) Comparison report generated using median value of the
relevant metric across the n-iterations.
Note: (b) was needed as runs on AWS were aborted midway and had to be partially re-run. We add Python parsing logic to extract out and massage metrics from "Summary: " output lines, that the server program emits to
stdout.Workflow to run the enhanced perf_report.py:
Example:
L3_PERF_TEST_NUM_ITERS=5 L3_PERF_SERVER_NUM_THREADS="1 2 4 8" ./test.sh --clock-default $((1000 * 1000))
Redirect output to a /tmp/file: > /tmp/perf.out 2>&1
grep 'Summary:' /tmp/perf.out > /tmp/perf.summary.out
Feed the summary file to the Python tool using:
./scripts/perf_report.py --summary-file /tmp/perf.summary.out
tests/pytests/perf_report_test.py: