MCPcopy Index your code
hub / github.com/nodejs/node / HumanReadable

Function HumanReadable

deps/v8/tools/gc-nvp-trace-processor.py:315–321  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

313 (prefix, n, total, max, avg, dev))
314
315 def HumanReadable(size):
316 suffixes = ['bytes', 'kB', 'MB', 'GB']
317 power = 1
318 for i in range(len(suffixes)):
319 if size < power*1024:
320 return "%.1f" % (float(size) / power) + " " + suffixes[i]
321 power *= 1024
322
323 def throughput(name, trace):
324 total_live_after = calc_total(trace, 'total_size_after')

Callers 1

throughputFunction · 0.85

Calls 1

rangeFunction · 0.50

Tested by

no test coverage detected