MCPcopy
hub / github.com/deepnote/deepnote / formatBytes

Function formatBytes

packages/cli/src/utils/metrics.ts:61–67  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

59
60/** Format bytes as human-readable string */
61export function formatBytes(bytes: number): string {
62 const mb = bytes / (1024 * 1024)
63 if (mb >= 1024) {
64 return `${(mb / 1024).toFixed(1)}GB`
65 }
66 return `${mb.toFixed(0)}MB`
67}
68
69/** Create a progress bar */
70export function createProgressBar(percent: number, width: number): string {

Callers 2

metrics.test.tsFile · 0.90
displayMetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected