diff --git a/app.js b/app.js index d41ab1b..b0c2b23 100644 --- a/app.js +++ b/app.js @@ -43,17 +43,12 @@ const report = (crawler) => { nodeStats[node.ip] = { ip: node.ip, location: node.location, - version: node.version, + version: node.config.version, height: node.height } } } - const allDelays = nodes.filter(item => item.latency).map(item => item.latency) - const averageDelay = (allDelays.reduce((a, b) => a + b, 0) / allDelays.length).toFixed(2) - const maxDelay = Math.max(...allDelays) - const minDelay = Math.min(...allDelays) - // Node stats; console.log('Individual node stats'); for (const node of orderBy(Object.values(nodeStats),['ip'],['desc'])) { @@ -88,14 +83,7 @@ const report = (crawler) => { for (const stat of orderBy(Object.values(versionStats), ['version'], ['desc'])) { console.log(` - ${stat.version} on ${stat.count} nodes`) } - - // delay stats - console.log('') - console.log('Delay') - console.log(` Avg: ${averageDelay}ms`) - console.log(` Min: ${minDelay}ms`) - console.log(` Max: ${maxDelay}ms`) - + console.log('------------------------------------------') console.log(`Finished scanning in ${new Date() - crawler.startTime}ms`)