docker-speedtest-grafana icon indicating copy to clipboard operation
docker-speedtest-grafana copied to clipboard

(Feature request) Test against multiple servers

Open anuragbhatia opened this issue 5 years ago • 4 comments

Please consider adding a feature where we can define multiple speed test server and it tests against those sequentially. One can define the speed test server using the ID.

I would love to have a test report from a couple of servers in India, Europe, US and Singapore.

anuragbhatia avatar Oct 02 '20 21:10 anuragbhatia

Why not just run multiple containers each with a different SPEEDTEST_HOST and SPEEDTEST_SERVER but all pointing to the same InfluxDB?

n1nj4888 avatar Oct 11 '20 13:10 n1nj4888

The problem in doing that would be - all speed test instance would run at the same time, will choke the pipe and will lead to inconsistent results. If running one after other then we know for sure that only one test is running a given time.

anuragbhatia avatar Oct 12 '20 06:10 anuragbhatia

You could add some delays in addition:

version: '2'

services:
  speedtest1:
    restart: always
    image: frdmn/speedtest-grafana:latest
    command: sh -c "
      sleep 300 &&
      node index.js"

  speedtest2:
    restart: always
    image: frdmn/speedtest-grafana:latest
    command: sh -c "
      sleep 600 &&
      node index.js"

frdmn avatar Oct 12 '20 07:10 frdmn

The above delays likely wouldn’t work well since, they could overlap in the future. Likely the better way would be to have a PR for looping through a list of comma-separated SERVER_HOST values but this seems a very specific use case? Changing the delay to be more of a cron-type schedule would also likely help for multiple containers at least

n1nj4888 avatar Oct 12 '20 07:10 n1nj4888