MCPcopy Create free account
hub / github.com/MikeLankamp/fpm / AppendHumanReadable

Function AppendHumanReadable

3rdparty/googlebench/src/string_util.cc:111–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109} // end namespace
110
111void AppendHumanReadable(int n, std::string* str) {
112 std::stringstream ss;
113 // Round down to the nearest SI prefix.
114 ss << ToBinaryStringFullySpecified(n, 1.0, 0);
115 *str += ss.str();
116}
117
118std::string HumanReadableNumber(double n, double one_k) {
119 // 1.1 means that figures up to 1.1k should be shown with the next unit down;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected