From 904ccf83b5927789a535acc3d473ba1460b15ad5 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 2 Mar 2023 08:40:18 +0100 Subject: [PATCH] Update check-dns.ps1 --- Scripts/check-dns.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Scripts/check-dns.ps1 b/Scripts/check-dns.ps1 index 93ea09fa..f87fc0ed 100755 --- a/Scripts/check-dns.ps1 +++ b/Scripts/check-dns.ps1 @@ -13,11 +13,10 @@ #> try { - Write-Progress "⏳ Loading Data/popular-domains.csv..." + Write-Progress "⏳ Resolving 200 popular domains..." $Table = Import-CSV "$PSScriptRoot/../Data/popular-domains.csv" $NumRows = $Table.Length - Write-Progress "⏳ Resolving $NumRows popular domains..." $StopWatch = [system.diagnostics.stopwatch]::startNew() if ($IsLinux) { foreach($Row in $Table){$nop=dig $Row.Domain +short} @@ -27,12 +26,12 @@ try { [float]$Elapsed = $StopWatch.Elapsed.TotalSeconds $Average = [math]::round($NumRows / $Elapsed, 1) + Write-Progress -completed "." if ($Average -gt 10.0) { Write-Host "✅ DNS resolution is $Average domains per second" } else { Write-Host "⚠️ DNS resolution is $Average domains per second only!" } - Write-Progress -completed " " exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"