MCPcopy Create free account
hub / github.com/SethGammon/Citadel / printStats

Function printStats

scripts/map-index.js:58–78  ·  view source on GitHub ↗
(stats)

Source from the content-addressed store, hash-verified

56}
57
58function printStats(stats) {
59 console.log('\nCodebase Index Statistics\n' + '='.repeat(40));
60 console.log(`Files: ${stats.files}`);
61 console.log(`Lines: ${stats.lines.toLocaleString()}`);
62 console.log(`Exports: ${stats.exports}`);
63 console.log(`Edges: ${stats.edges} (dependency links)`);
64 console.log(`Routes: ${stats.routes}`);
65 console.log(`Scripts: ${stats.packageScripts}`);
66 console.log(`Verify: ${stats.verificationCommands} commands`);
67
68 console.log('\nBy language:');
69 for (const [lang, count] of Object.entries(stats.byLanguage).sort((a, b) => b[1] - a[1])) {
70 console.log(` ${lang.padEnd(14)} ${count}`);
71 }
72
73 console.log('\nBy role:');
74 for (const [role, count] of Object.entries(stats.byRole).sort((a, b) => b[1] - a[1])) {
75 console.log(` ${role.padEnd(14)} ${count}`);
76 }
77 console.log('');
78}
79
80function loadRequiredIndex(outputPath) {
81 if (!fs.existsSync(outputPath)) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected