diff --git a/scripts/check-dns.ps1 b/scripts/check-dns.ps1 index 296033df..fa685b62 100755 --- a/scripts/check-dns.ps1 +++ b/scripts/check-dns.ps1 @@ -5,7 +5,7 @@ This PowerShell script measures the DNS resolution speed using 100 internet domains and prints it. .EXAMPLE PS> ./check-dns.ps1 - ✅ Internet DNS queries take 33.6ms + ✅ Internet DNS lookups in 33.6ms .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -25,9 +25,9 @@ try { [float]$elapsed = $stopWatch.Elapsed.TotalSeconds * 1000.0 $speed = [math]::round($elapsed / $table.Length, 1) if ($speed -gt 100.0) { - Write-Host "⚠️ Internet DNS queries are $($speed)ms slow" + Write-Host "⚠️ Internet DNS lookups take $($speed)ms!" } else { - Write-Host "✅ Internet DNS queries take $($speed)ms" + Write-Host "✅ Internet DNS lookups in $($speed)ms" } exit 0 # success } catch { diff --git a/scripts/ping-internet.ps1 b/scripts/ping-internet.ps1 index 4da3221c..5defe5bc 100755 --- a/scripts/ping-internet.ps1 +++ b/scripts/ping-internet.ps1 @@ -7,7 +7,7 @@ Specifies the hosts to ping, seperated by commata (10 Internet servers by default) .EXAMPLE PS> ./ping-internet.ps1 - ✅ Internet ping latency 12ms (9...18ms range) + ✅ Internet ping takes 12ms (9...18ms range) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -34,12 +34,12 @@ try { [int]$loss = $total - $success if ($success -eq 0) { Write-Host "⚠️ Internet offline (100% ping loss)" - } elseif ($loss -eq 0) { - [float]$speed = [math]::round([float]$avg / [float]$success, 1) - Write-Host "✅ Internet ping latency $($speed)ms ($($min)...$($max)ms range)" - } else { + } elseif ($loss -gt 0) { [float]$speed = [math]::round([float]$avg / [float]$success, 1) Write-Host "✅ Online with $loss/$total ping loss and $($min)...$($max)ms latency - $($speed)ms average" + } else { + [float]$speed = [math]::round([float]$avg / [float]$success, 1) + Write-Host "✅ Internet ping takes $($speed)ms ($($min)...$($max)ms range)" } exit 0 # success } catch {