MCPcopy
hub / github.com/mitmproxy/mitmproxy / format_size

Function format_size

mitmproxy/tools/console/common.py:343–346  ·  view source on GitHub ↗
(num_bytes: int)

Source from the content-addressed store, hash-verified

341
342
343def format_size(num_bytes: int) -> tuple[str, str]:
344 pretty_size = human.pretty_size(num_bytes)
345 style = "gradient_%02d" % int(99 - 100 * min(math.log2(1 + num_bytes) / 20, 0.99))
346 return pretty_size, style
347
348
349def format_left_indicators(*, focused: bool, intercepted: bool, timestamp: float):

Callers 3

format_http_flow_listFunction · 0.85
format_http_flow_tableFunction · 0.85
format_message_flowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…