Skip to content

Conversation

@ShadowCurse
Copy link
Contributor

@ShadowCurse ShadowCurse commented Nov 10, 2025

Changes

Add a script to create tables and plots for performance runs. It works for both single and multiple runs and can generate pdf and html output.

Here are exaples of the output:
test_block_performance.pdf
test_block_performance.html

Reason

Better A/B comparisons.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

@ShadowCurse ShadowCurse self-assigned this Nov 10, 2025
@ShadowCurse ShadowCurse added the Type: Enhancement Indicates new feature requests label Nov 10, 2025
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.87%. Comparing base (fa2627a) to head (7b97660).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5508   +/-   ##
=======================================
  Coverage   82.87%   82.87%           
=======================================
  Files         270      270           
  Lines       27780    27780           
=======================================
  Hits        23024    23024           
  Misses       4756     4756           
Flag Coverage Δ
5.10-m5n.metal 83.06% <ø> (ø)
5.10-m6a.metal 82.33% <ø> (+0.01%) ⬆️
5.10-m6g.metal 79.63% <ø> (-0.01%) ⬇️
5.10-m6i.metal 83.05% <ø> (-0.01%) ⬇️
5.10-m7a.metal-48xl 82.32% <ø> (ø)
5.10-m7g.metal 79.63% <ø> (-0.01%) ⬇️
5.10-m7i.metal-24xl 83.02% <ø> (ø)
5.10-m7i.metal-48xl 83.02% <ø> (ø)
5.10-m8g.metal-24xl 79.63% <ø> (ø)
5.10-m8g.metal-48xl 79.63% <ø> (ø)
6.1-m5n.metal 83.09% <ø> (+<0.01%) ⬆️
6.1-m6a.metal 82.36% <ø> (ø)
6.1-m6g.metal 79.63% <ø> (-0.01%) ⬇️
6.1-m6i.metal 83.08% <ø> (+<0.01%) ⬆️
6.1-m7a.metal-48xl 82.35% <ø> (ø)
6.1-m7g.metal 79.63% <ø> (-0.01%) ⬇️
6.1-m7i.metal-24xl 83.09% <ø> (ø)
6.1-m7i.metal-48xl 83.10% <ø> (ø)
6.1-m8g.metal-24xl 79.63% <ø> (-0.01%) ⬇️
6.1-m8g.metal-48xl 79.63% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ShadowCurse ShadowCurse force-pushed the ab_visualization branch 7 times, most recently from 8c540fc to 54e520a Compare November 14, 2025 12:50
JackThomson2
JackThomson2 previously approved these changes Nov 14, 2025
Add a script to create visualizations of performance data.
- works for both single and multiple inputs
- allows comparison of different hosts
- allows comparison of multiple tests
- can generate pdf and html outputs

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
These libraries are needed for the ab_plot.py.
At the same time update `python` version defined in the
`pyproject.toml`. This is required because for some reason
poetry errors when pooling dependencies saying the python
version is too old. Updating the python version caused
other problems with poetry installation with `pip3 install`.
Because of this, change the way poetry is insatlled by
pooling it directly from a website. Additionally the change
broke somehow `virtualenv`, so just install `python3-venv` manually.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
usage:

```sh
./tools/plot.py a_path b_path --output_type pdf

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct filename

Suggested change
./tools/plot.py a_path b_path --output_type pdf
./tools/ab_plot.py a_path b_path --output_type pdf


### A/B visualization

To create visualization of A/B runs use `tools/ab_plot.py` script. Example

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps worth noting that pdf generation may be slow for tests that generate a lot of data? E.g. test_boottime.py:

  • pdf: 60s
  • table 0.3s

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should add a code path in the devtool to run this? That way it's consistent with the already existing run and analyze commands. Let me know what you think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement Indicates new feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants