MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / thousands

Method thousands

src/flameGraph.cpp:46–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45 public:
46 const char* thousands(u64 value) {
47 char* p = _buf + sizeof(_buf) - 1;
48 *p = 0;
49
50 while (value >= 1000) {
51 p -= 4;
52 p[0] = ',';
53 p[1] = '0' + char(value % 1000 / 100);
54 p[2] = '0' + char(value % 100 / 10);
55 p[3] = '0' + char(value % 10);
56 value /= 1000;
57 }
58
59 do {
60 *--p = '0' + char(value % 10);
61 } while ((value /= 10) > 0);
62
63 return p;
64 }
65};
66
67

Callers 2

dumpMethod · 0.80
printTreeFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected