| 42 | } |
| 43 | |
| 44 | string FormatTime(int64 micros) { |
| 45 | if (micros < 1000) { |
| 46 | return strings::Printf("%lldus", micros); |
| 47 | } else if (micros < 1000000) { |
| 48 | return strings::Printf("%.2fms", micros / 1000.0); |
| 49 | } else { |
| 50 | return strings::Printf("%.2fsec", micros / 1000000.0); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | string FormatMemory(int64 bytes) { |
| 55 | if (bytes < 1000) { |
no test coverage detected