Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
jsonrpsee
Commits
56cb07c2
Unverified
Commit
56cb07c2
authored
Jul 13, 2022
by
Alexandru Vasile
Browse files
bench: Use KIB instead of `1 * KiB`
Signed-off-by:
Alexandru Vasile
<
alexandru.vasile@parity.io
>
parent
db35a04d
Pipeline
#202779
passed with stages
in 6 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
benches/bench.rs
View file @
56cb07c2
...
...
@@ -320,7 +320,7 @@ fn http_custom_headers_round_trip(
name
:
&
str
,
request
:
RequestType
,
)
{
for
header_size
in
[
1
*
KIB
,
2
*
KIB
,
8
*
KIB
]
{
for
header_size
in
[
KIB
,
2
*
KIB
,
8
*
KIB
]
{
let
mut
headers
=
HeaderMap
::
new
();
headers
.insert
(
"key"
,
"A"
.repeat
(
header_size
)
.parse
()
.unwrap
());
...
...
@@ -334,7 +334,7 @@ fn http_custom_headers_round_trip(
/// Bench WS handshake with different header sizes.
fn
ws_custom_headers_handshake
(
rt
:
&
TokioRuntime
,
crit
:
&
mut
Criterion
,
url
:
&
str
,
name
:
&
str
,
request
:
RequestType
)
{
let
mut
group
=
crit
.benchmark_group
(
request
.group_name
(
name
));
for
header_size
in
[
0
,
1
*
KIB
,
2
*
KIB
,
4
*
KIB
]
{
for
header_size
in
[
0
,
KIB
,
2
*
KIB
,
4
*
KIB
]
{
group
.bench_function
(
format!
(
"{}"
,
header_size
),
|
b
|
{
b
.to_async
(
rt
)
.iter
(||
async
move
{
let
mut
headers
=
HeaderMap
::
new
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment