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

Rename test::BenchHarness to test::Bencher #12640

Closed
liigo opened this issue Mar 1, 2014 · 10 comments · Fixed by #13236
Closed

Rename test::BenchHarness to test::Bencher #12640

liigo opened this issue Mar 1, 2014 · 10 comments · Fixed by #13236

Comments

@liigo
Copy link
Contributor

liigo commented Mar 1, 2014

test::BenchHarness is too long, and not that straightforward. As a type name Bencher is more consistent with #[bench] attributes.

#[cfg(test)]
mod bench {
    use test::Bencher;

    #[bench]
    pub fn foo(b: &mut Bencher) {
    }
}
@huonw
Copy link
Member

huonw commented Mar 1, 2014

I disagree entirely that BenchHarness is not meaningful: it's the harness/framework/manager that coordinates running a benchmark.

In any case, BenchHarness is not a benchmark itself, which is what the Bench name suggests to me. Bencher would be ok, I guess.

@huonw huonw added the A-libs label Mar 1, 2014
@pongad
Copy link
Contributor

pongad commented Mar 2, 2014

+1 for Bencher. Short and descriptive :D

@liigo
Copy link
Contributor Author

liigo commented Mar 3, 2014

changing issue's title to use new name Bencher

@liigo
Copy link
Contributor Author

liigo commented Mar 3, 2014

@huonw What is "harness" meaning? Perhaps it's meaningful, but it's not straightforward, at least for non-native English users. (I have changed issue content, +1 for Bencher.)

@huonw
Copy link
Member

huonw commented Mar 3, 2014

@liigo
Copy link
Contributor Author

liigo commented Mar 4, 2014

How about rename it to test::B? (like Golang did)

@pongad
Copy link
Contributor

pongad commented Mar 4, 2014

Not sure if this is a good idea. In general Rust names are more verbose
than Go's. I don't mean it in the bad way. For example, we have
BufferedReader when Go has bufio.Reader. It is just different style. I
think test::B would be too inconsistent.

On Mon, Mar 3, 2014 at 9:51 PM, Liigo Zhuang [email protected]:

How about rename it to test::B? (like Golang did)


Reply to this email directly or view it on GitHubhttps://github.com//issues/12640#issuecomment-36587077
.

@liigo
Copy link
Contributor Author

liigo commented Mar 4, 2014

@pongad In Rust, there are also names such as Items Chars returns Iterator type, without "Iterator" in their names.

@liigo
Copy link
Contributor Author

liigo commented Mar 20, 2014

ping. @huonw and @pongad had suggested or +1 for Bencher, is there anyone oppose this rename? If no, I'll submit a PR to implement it later. @alexcrichton ?

@alexcrichton
Copy link
Member

Let's do it.

liigo added a commit to liigo/rust that referenced this issue Mar 20, 2014
liigo added a commit to liigo/rust that referenced this issue Apr 1, 2014
bors added a commit that referenced this issue Apr 1, 2014
Closes #12640

based on PR #13030, rebased, and passed all tests.
bors added a commit that referenced this issue Apr 11, 2014
Closes #12640

based on PR #13030, rebased, and passed all tests.
@bors bors closed this as completed in 408f484 Apr 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants