Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

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 force-pushed the ci/test_code_length_estimate branch from dd41ce7 to 15cada9 Compare September 6, 2024 09:42
@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
@Lichtso Lichtso requested a review from LucasSte September 25, 2024 07:57
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants