diff --git a/lib/core.js b/lib/core.js index 1ff8bb4..9978f7e 100644 --- a/lib/core.js +++ b/lib/core.js @@ -568,6 +568,7 @@ core.start = async (commander) => { let processedChannels = 0; let earliestTs = null; let latestTs = null; + const fetchedPerChannel = {}; const CONCURRENCY = 5; const processMessage = (message, channelId) => { @@ -632,6 +633,7 @@ core.start = async (commander) => { }); totalFetched++; + fetchedPerChannel[channelId] = (fetchedPerChannel[channelId] || 0) + 1; const ts = parseFloat(message.ts); if (earliestTs === null || ts < earliestTs) earliestTs = ts; @@ -676,6 +678,11 @@ core.start = async (commander) => { clearInterval(progressInterval); if (totalFetched > 0) { process.stdout.write(`Backfill complete: ${totalFetched} message(s) fetched.\n`); + Object.entries(fetchedPerChannel) + .sort((a, b) => b[1] - a[1]) + .forEach(([chId, count]) => { + process.stdout.write(` ${resolveChannelLabelKey(chId)}: ${count} message(s)\n`); + }); } else { process.stdout.write("Backfill complete: no new messages.\n"); }