firecracker
firecracker copied to clipboard
refactor: simplify get_msr_chunks
Changes
Move logic to create single msr chunk into separate function. Also use iterators for msr indexes to remove some unneeded allocations.
Reason
Minor simplification and removal of unneeded allocations.
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
- [ ] If a specific issue led to this PR, this PR closes the issue.
- [ ] The description of changes is clear and encompassing.
- [ ] Any required documentation changes (code and docs) are included in this PR.
- [ ] API changes follow the Runbook for Firecracker API changes.
- [ ] User-facing changes are mentioned in
CHANGELOG.md. - [ ] All added/changed functionality is tested.
- [ ] New
TODOs link to an issue. - [ ] Commits meet contribution quality standards.
- [ ] This functionality cannot be added in
rust-vmm.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.08%. Comparing base (
6d6caf4) to head (36d709c).
Additional details and impacted files
@@ Coverage Diff @@
## main #4649 +/- ##
=======================================
Coverage 82.08% 82.08%
=======================================
Files 255 255
Lines 31257 31267 +10
=======================================
+ Hits 25656 25666 +10
Misses 5601 5601
| Flag | Coverage Δ | |
|---|---|---|
| 4.14-c5n.metal | 79.58% <100.00%> (+<0.01%) |
:arrow_up: |
| 4.14-m5n.metal | 79.56% <100.00%> (+<0.01%) |
:arrow_up: |
| 4.14-m6a.metal | 78.78% <100.00%> (+<0.01%) |
:arrow_up: |
| 4.14-m6g.metal | 76.60% <ø> (ø) |
|
| 4.14-m6i.metal | 79.55% <100.00%> (+<0.01%) |
:arrow_up: |
| 4.14-m7g.metal | 76.60% <ø> (ø) |
|
| 5.10-c5n.metal | 82.09% <100.00%> (+<0.01%) |
:arrow_up: |
| 5.10-m5n.metal | 82.08% <100.00%> (+<0.01%) |
:arrow_up: |
| 5.10-m6a.metal | 81.38% <100.00%> (-0.01%) |
:arrow_down: |
| 5.10-m6g.metal | 79.37% <ø> (ø) |
|
| 5.10-m6i.metal | 82.08% <100.00%> (+<0.01%) |
:arrow_up: |
| 5.10-m7g.metal | 79.37% <ø> (ø) |
|
| 6.1-c5n.metal | 82.09% <100.00%> (+<0.01%) |
:arrow_up: |
| 6.1-m5n.metal | 82.08% <100.00%> (+<0.01%) |
:arrow_up: |
| 6.1-m6a.metal | 81.38% <100.00%> (-0.01%) |
:arrow_down: |
| 6.1-m6g.metal | 79.36% <ø> (-0.01%) |
:arrow_down: |
| 6.1-m6i.metal | 82.07% <100.00%> (+<0.01%) |
:arrow_up: |
| 6.1-m7g.metal | 79.36% <ø> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.