Skip to content

bench should put deliminators on nanosecond numbers #26109

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

Closed
mdinger opened this issue Jun 8, 2015 · 2 comments
Closed

bench should put deliminators on nanosecond numbers #26109

mdinger opened this issue Jun 8, 2015 · 2 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@mdinger
Copy link
Contributor

mdinger commented Jun 8, 2015

From this initial rust experience blog, cargo bench (I assume identical to rustc --test) should report nanosecond times as 3_000_000 or 3,000,000, not 3000000.

This reportedly would require fixing in libtest.

@steveklabnik steveklabnik added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-benchmarks labels Jun 8, 2015
@bluss
Copy link
Member

bluss commented Jun 8, 2015

I posted a PR for this yesterday. Well I chose to round & use units, but you can opine either way #26068

@mdinger
Copy link
Contributor Author

mdinger commented Jun 8, 2015

@bluss nice! If you'll just tag that as fixing this then bors will take care of the rest.

bluss pushed a commit to bluss/rust that referenced this issue Jun 9, 2015
Example display:

```
running 9 tests
test a ... bench:           0 ns/iter (+/- 0)
test b ... bench:          52 ns/iter (+/- 0)
test c ... bench:          88 ns/iter (+/- 0)
test d ... bench:         618 ns/iter (+/- 111)
test e ... bench:       5,933 ns/iter (+/- 87)
test f ... bench:      59,280 ns/iter (+/- 1,052)
test g ... bench:     588,672 ns/iter (+/- 3,381)
test h ... bench:   5,894,227 ns/iter (+/- 303,489)
test i ... bench:  59,112,382 ns/iter (+/- 1,500,110)
```

Fixes rust-lang#10953
Fixes rust-lang#26109
bors added a commit that referenced this issue Jun 9, 2015
test: Display benchmark results with thousands separators

Example display:

```
running 9 tests
test a ... bench:           0 ns/iter (+/- 0)
test b ... bench:          52 ns/iter (+/- 0)
test c ... bench:          88 ns/iter (+/- 0)
test d ... bench:         618 ns/iter (+/- 111)
test e ... bench:       5,933 ns/iter (+/- 87)
test f ... bench:      59,280 ns/iter (+/- 1,052)
test g ... bench:     588,672 ns/iter (+/- 3,381)
test h ... bench:   5,894,227 ns/iter (+/- 303,489)
test i ... bench:  59,112,382 ns/iter (+/- 1,500,110)
```

Fixes #10953
Fixes #26109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants