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

Function megabytes_per_second

bench/bench-conv.cpp:329–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329std::size_t
330megabytes_per_second(
331 file_item const& file, std::size_t calls, std::size_t millis)
332{
333 double result = file.text.size();
334 result /= 1024 * 1024; // size in megabytes
335 result *= calls;
336 result /= millis; // mb per ms
337 result *= 1000; // mb per s
338 return static_cast<std::size_t>(0.5 + result); // round up
339}
340
341std::ostream&
342print_prefix(

Callers 1

do_testFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected