refactor(benches): make benchmark names more consistent
This commit is contained in:
@@ -13,20 +13,20 @@ use hyper::{body::HttpBody as _, Body, Method, Request, Response, Server};
|
|||||||
// HTTP1
|
// HTTP1
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn http1_get(b: &mut test::Bencher) {
|
fn http1_consecutive_x1_empty(b: &mut test::Bencher) {
|
||||||
opts().bench(b)
|
opts().bench(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn http1_post(b: &mut test::Bencher) {
|
fn http1_consecutive_x1_req_10b(b: &mut test::Bencher) {
|
||||||
opts()
|
opts()
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
.request_body(b"foo bar baz quux")
|
.request_body(&[b's'; 10])
|
||||||
.bench(b)
|
.bench(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[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];
|
let body = &[b'x'; 1024 * 100];
|
||||||
opts()
|
opts()
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
@@ -36,7 +36,7 @@ fn http1_body_both_100kb(b: &mut test::Bencher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[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];
|
let body = &[b'x'; 1024 * 1024 * 10];
|
||||||
opts()
|
opts()
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
@@ -87,21 +87,21 @@ fn http1_parallel_x10_res_10mb(b: &mut test::Bencher) {
|
|||||||
const HTTP2_MAX_WINDOW: u32 = std::u32::MAX >> 1;
|
const HTTP2_MAX_WINDOW: u32 = std::u32::MAX >> 1;
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn http2_get(b: &mut test::Bencher) {
|
fn http2_consecutive_x1_empty(b: &mut test::Bencher) {
|
||||||
opts().http2().bench(b)
|
opts().http2().bench(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn http2_post(b: &mut test::Bencher) {
|
fn http2_consecutive_x1_req_10b(b: &mut test::Bencher) {
|
||||||
opts()
|
opts()
|
||||||
.http2()
|
.http2()
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
.request_body(b"foo bar baz quux")
|
.request_body(&[b's'; 10])
|
||||||
.bench(b)
|
.bench(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[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];
|
let body = &[b'x'; 1024 * 100];
|
||||||
opts()
|
opts()
|
||||||
.http2()
|
.http2()
|
||||||
|
|||||||
Reference in New Issue
Block a user