MCPcopy Create free account
hub / github.com/boostorg/json / serialize_string

Method serialize_string

bench/bench.cpp:749–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747 }
748
749 clock_type::duration
750 serialize_string(file_item const& fi, std::size_t repeat) const override
751 {
752 monotonic_resource mr;
753 storage_ptr sp;
754 if( is_pool_ )
755 sp = &mr;
756
757 auto jv = json::parse( fi.text, std::move(sp) );
758
759 auto const start = clock_type::now();
760 std::string out;
761 while(repeat--)
762 {
763 std::ostringstream os;
764 os.exceptions(std::ios::failbit);
765 os << jv;
766 out = os.str();
767 }
768 return clock_type::now() - start;
769 }
770};
771
772//----------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected