Python script to ping a server (Google by default) to test for latency. Includes a threshold setting allowing you to log entries that take longer than X milliseconds. Created with love by FlipperPA fueled by his loathing of Comcast.

FlipperPA FlipperPA Last update: Aug 21, 2022

latency-tester

A Python script to ping a server (Google by default) to test for latency issues. Includes a threshold setting allowing you to log entries that take longer than X seconds, 0.25 by default. Created with love by FlipperPA fueled by his loathing of Comcast.

Install & Running

To install dependencies:

pip install -r requirements.txt

To run:

python latency-tester.py

Building Docker Container

$ docker build -t latency-tester .

Running Docker Container

docker run --name latency-tester latency-tester

With log files mapped to host:

docker run --name latency-tester -v <host_dir>:/root/logs/. latency-tester
Tags:

PRAGMA foreign_keys = off; BEGIN TRANSACTION; COMMIT TRANSACTION; PRAGMA foreign_keys = on;

Subscribe to our newsletter