Lines Matching refs:bytes
67 int AppendHumanBytes(uint64_t bytes, char* output, int len) { in AppendHumanBytes() argument
69 if (bytes >= ull10 << 40) { in AppendHumanBytes()
70 return snprintf(output, len, "%" PRIu64 "TB", bytes >> 40); in AppendHumanBytes()
71 } else if (bytes >= ull10 << 30) { in AppendHumanBytes()
72 return snprintf(output, len, "%" PRIu64 "GB", bytes >> 30); in AppendHumanBytes()
73 } else if (bytes >= ull10 << 20) { in AppendHumanBytes()
74 return snprintf(output, len, "%" PRIu64 "MB", bytes >> 20); in AppendHumanBytes()
75 } else if (bytes >= ull10 << 10) { in AppendHumanBytes()
76 return snprintf(output, len, "%" PRIu64 "KB", bytes >> 10); in AppendHumanBytes()
78 return snprintf(output, len, "%" PRIu64 "B", bytes); in AppendHumanBytes()
123 std::string BytesToHumanString(uint64_t bytes) { in BytesToHumanString() argument
125 double final_size = static_cast<double>(bytes); in BytesToHumanString()