Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI - Have test_code_length_estimate() test MACHINE_CODE_PER_INSTRUCTION_METER_CHECKPOINT #588

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Sep 6, 2024

No description provided.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.07%. Comparing base (a996494) to head (dd41ce7).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #588      +/-   ##
==========================================
+ Coverage   89.92%   90.07%   +0.15%     
==========================================
  Files          22       22              
  Lines        9735     9713      -22     
==========================================
- Hits         8754     8749       -5     
+ Misses        981      964      -17     

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

@Lichtso Lichtso merged commit 53acec3 into main Sep 6, 2024
12 checks passed
@Lichtso Lichtso deleted the ci/test_code_length_estimate branch September 6, 2024 09:50
Comment on lines +1800 to +1802
machine_code_length as f64 / instruction_count as f64;
assert!(
machine_code_length_per_instruction <= MAX_MACHINE_CODE_LENGTH_PER_INSTRUCTION
(machine_code_length_per_instruction + 0.5) as usize
Copy link

@LucasSte LucasSte Sep 25, 2024

Choose a reason for hiding this comment

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

You don't need the floating point for the division. machine_code_length % instruction_count is always zero. In addition, our overestimation of MAX_MACHINE_CODE_LENGTH_PER_INSTRUCTION already covers the extra 0.5, so we can remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants