MCPcopy
hub / github.com/deepnote/deepnote / formatMemoryDelta

Function formatMemoryDelta

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

Source from the content-addressed store, hash-verified

104
105/** Format memory delta as human-readable string with sign */
106export function formatMemoryDelta(bytes: number): string {
107 const sign = bytes >= 0 ? '+' : ''
108 const mb = bytes / (1024 * 1024)
109 if (Math.abs(mb) >= 1024) {
110 return `${sign}${(mb / 1024).toFixed(1)}GB`
111 }
112 return `${sign}${mb.toFixed(0)}MB`
113}
114
115/** Display profile summary table */
116export function displayProfileSummary(profiles: BlockProfile[]): void {

Callers 3

metrics.test.tsFile · 0.90
recordBlockProfileFunction · 0.90
displayProfileSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected