Skip to content

Commit 90d858f

Browse files
committed
simple and operator benchmarks use monotonic resource
1 parent 7a76ac3 commit 90d858f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bench/bench.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ class boost_simple_impl : public any_impl
680680
while(repeat--)
681681
{
682682
error_code ec;
683-
auto jv = json::parse(s, ec, {}, popts);
683+
monotonic_resource mr;
684+
auto jv = json::parse(s, ec, &mr, popts);
684685
(void)jv;
685686
}
686687
return clock_type::now() - start;
@@ -694,7 +695,8 @@ class boost_simple_impl : public any_impl
694695
{
695696
error_code ec;
696697
std::ifstream is( fi.name, std::ios::in | std::ios::binary );
697-
auto jv = json::parse(is, ec, {}, popts);
698+
monotonic_resource mr;
699+
auto jv = json::parse(is, ec, &mr, popts);
698700
(void)jv;
699701
}
700702
return clock_type::now() - start;
@@ -743,7 +745,8 @@ class boost_operator_impl : public any_impl
743745
auto const start = clock_type::now();
744746
while(repeat--)
745747
{
746-
value jv;
748+
monotonic_resource mr;
749+
value jv(&mr);
747750
is.seekg(0);
748751
is >> popts >> jv;
749752
}
@@ -756,7 +759,8 @@ class boost_operator_impl : public any_impl
756759
auto const start = clock_type::now();
757760
while(repeat--)
758761
{
759-
value jv;
762+
monotonic_resource mr;
763+
value jv(&mr);
760764
std::ifstream is( fi.name, std::ios::in | std::ios::binary );
761765
is >> popts >> jv;
762766
}

0 commit comments

Comments
 (0)