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

Function megabytes_per_second

bench/bench.cpp:265–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265std::size_t
266megabytes_per_second(
267 file_item const& file, std::size_t calls, std::size_t millis)
268{
269 double result = file.text.size();
270 result /= 1024 * 1024; // size in megabytes
271 result *= calls;
272 result /= millis; // mb per ms
273 result *= 1000; // mb per s
274 return static_cast<std::size_t>(0.5 + result); // round up
275}
276
277std::ostream&
278print_prefix(

Callers 1

benchFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected