Skip to content

Commit

Permalink
simple and operator benchmarks use monotonic resource
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Nov 8, 2023
1 parent 7a76ac3 commit 90d858f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,8 @@ class boost_simple_impl : public any_impl
while(repeat--)
{
error_code ec;
auto jv = json::parse(s, ec, {}, popts);
monotonic_resource mr;
auto jv = json::parse(s, ec, &mr, popts);
(void)jv;
}
return clock_type::now() - start;
Expand All @@ -694,7 +695,8 @@ class boost_simple_impl : public any_impl
{
error_code ec;
std::ifstream is( fi.name, std::ios::in | std::ios::binary );
auto jv = json::parse(is, ec, {}, popts);
monotonic_resource mr;
auto jv = json::parse(is, ec, &mr, popts);
(void)jv;
}
return clock_type::now() - start;
Expand Down Expand Up @@ -743,7 +745,8 @@ class boost_operator_impl : public any_impl
auto const start = clock_type::now();
while(repeat--)
{
value jv;
monotonic_resource mr;
value jv(&mr);
is.seekg(0);
is >> popts >> jv;
}
Expand All @@ -756,7 +759,8 @@ class boost_operator_impl : public any_impl
auto const start = clock_type::now();
while(repeat--)
{
value jv;
monotonic_resource mr;
value jv(&mr);
std::ifstream is( fi.name, std::ios::in | std::ios::binary );
is >> popts >> jv;
}
Expand Down

0 comments on commit 90d858f

Please sign in to comment.