From 90d858fc70ddd16898c29eec58692a50fb6902d6 Mon Sep 17 00:00:00 2001 From: Dmitry Arkhipov Date: Mon, 16 Oct 2023 17:10:09 +0300 Subject: [PATCH] simple and operator benchmarks use monotonic resource --- bench/bench.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bench/bench.cpp b/bench/bench.cpp index 683907dca..eb34c5016 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -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; @@ -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; @@ -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; } @@ -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; }