oxedyne/fe2o3/fe2o3_text/tests/detect_corpus/js/shebang.txt
585 bytes, 1 run
created by r1870400018:12006, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | #!/usr/bin/env node |
| 2 | |
| 3 | const args = process.argv.slice(2); |
| 4 | const verbose = args.includes('--verbose'); |
| 5 | |
| 6 | function formatBytes(bytes) { |
| 7 | if (bytes === 0) return '0 B'; |
| 8 | const units = ['B', 'KB', 'MB', 'GB', 'TB']; |
| 9 | const i = Math.floor(Math.log(bytes) / Math.log(1024)); |
| 10 | return `${(bytes / Math.pow(1024, i)).toFixed(1)} ${units[i]}`; |
| 11 | } |
| 12 | |
| 13 | const usage = process.memoryUsage(); |
| 14 | console.log(`heap: ${formatBytes(usage.heapUsed)} / ${formatBytes(usage.heapTotal)}`); |
| 15 | console.log(`rss: ${formatBytes(usage.rss)}`); |
| 16 | |
| 17 | if (verbose) { |
| 18 | console.log(JSON.stringify(usage, null, 2)); |
| 19 | } |