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

feat(bench): print iter/s in the report #19994

Merged
merged 10 commits into from
Aug 1, 2023

Conversation

bartlomieju
Copy link
Member

Requested by @piscisaureus

Screenshot 2023-07-28 at 15 42 26

@bartlomieju bartlomieju enabled auto-merge (squash) July 31, 2023 21:01
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

See comment.

cli/tools/bench/mitata.rs Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

}

#[test]
fn test_into_decimal_and_fractional_parts() {
Copy link
Member

Choose a reason for hiding this comment

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

Not really a fan of tests being so inline like this because it's noisy when scrolling between functions.

Copy link
Member Author

Choose a reason for hiding this comment

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

This module hasn't really been visited since it's was added, but I'll make a note of that and do a drive-by cleanup once I touch something around testing/benchmarking in the future.

@bartlomieju bartlomieju merged commit 36ae376 into denoland:main Aug 1, 2023
12 checks passed
@bartlomieju bartlomieju deleted the bench_add_iter_per_s branch August 1, 2023 23:56
let fractional_part = {
let decs = ((num - num.floor()) * 10.0).round();
if decs == 10.0 {
0
Copy link
Member

@dsherret dsherret Aug 2, 2023

Choose a reason for hiding this comment

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

I just realized I forgot to mention this. Here's a failing test case:

assert_eq!(into_decimal_and_fractional_parts(10.99), (11, 0)); // currently does 10.0

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.

2 participants