macOS have a built-in “networkQuality” command line tool (`man networkQuality` or https://support.apple.com/kb/HT212313 ). (iOS and iPadOS have a similar tool if a “WiFi Performance Diagnostics” profile has been installed).
$ networkQuality
==== SUMMARY ====
Uplink capacity: 1.029 Gbps
Downlink capacity: 2.132 Gbps
Uplink Responsiveness: High (7199 RPM)
Downlink Responsiveness: Medium (450 RPM)
Idle Latency: 12.042 milliseconds