Skip to content

Commit

Permalink
refactor(benches): make benchmark names more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Nov 12, 2021
1 parent 174b553 commit 7f5e853
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions benches/end_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ use hyper::{body::HttpBody as _, Body, Method, Request, Response, Server};
// HTTP1

#[bench]
fn http1_get(b: &mut test::Bencher) {
fn http1_consecutive_x1_empty(b: &mut test::Bencher) {
opts().bench(b)
}

#[bench]
fn http1_post(b: &mut test::Bencher) {
fn http1_consecutive_x1_req_10b(b: &mut test::Bencher) {
opts()
.method(Method::POST)
.request_body(b"foo bar baz quux")
.request_body(&[b's'; 10])
.bench(b)
}

#[bench]
fn http1_body_both_100kb(b: &mut test::Bencher) {
fn http1_consecutive_x1_both_100kb(b: &mut test::Bencher) {
let body = &[b'x'; 1024 * 100];
opts()
.method(Method::POST)
Expand All @@ -36,7 +36,7 @@ fn http1_body_both_100kb(b: &mut test::Bencher) {
}

#[bench]
fn http1_body_both_10mb(b: &mut test::Bencher) {
fn http1_consecutive_x1_both_10mb(b: &mut test::Bencher) {
let body = &[b'x'; 1024 * 1024 * 10];
opts()
.method(Method::POST)
Expand Down Expand Up @@ -87,21 +87,21 @@ fn http1_parallel_x10_res_10mb(b: &mut test::Bencher) {
const HTTP2_MAX_WINDOW: u32 = std::u32::MAX >> 1;

#[bench]
fn http2_get(b: &mut test::Bencher) {
fn http2_consecutive_x1_empty(b: &mut test::Bencher) {
opts().http2().bench(b)
}

#[bench]
fn http2_post(b: &mut test::Bencher) {
fn http2_consecutive_x1_req_10b(b: &mut test::Bencher) {
opts()
.http2()
.method(Method::POST)
.request_body(b"foo bar baz quux")
.request_body(&[b's'; 10])
.bench(b)
}

#[bench]
fn http2_req_100kb(b: &mut test::Bencher) {
fn http2_consecutive_x1_req_100kb(b: &mut test::Bencher) {
let body = &[b'x'; 1024 * 100];
opts()
.http2()
Expand Down

0 comments on commit 7f5e853

Please sign in to comment.