omnt / OpenMobileNetworkToolkit

OpenMobileNetworkToolkit
BSD 3-Clause Clear License
22 stars 4 forks source link

iPerf Upload with 0 Duration #27

Open nickvsnetworking opened 2 months ago

nickvsnetworking commented 2 months ago

Bug Report

Description

Currently when creating an iPerf test you can set the duration of the test, or set to 0 which will run forever / continuous. This works fine. But it seems the data is only uploaded / pushed to InfluxDB on completion of the test, so running a continuous test will never actually yield the results to get pushed.

How to Reproduce

Steps to reproduce the behavior:

  1. Go to iPerf
  2. Start a job with the duration set to 0
  3. "Send"
  4. Check output to InfluxDB (Nothing is pushed)

Possible Fix

I'm not sure if it's possible to upload the results as each datapoint comes back from iPerf, or if the process needs to wait until the job has completed before getting access to the results.

Perhaps a simple "Run continuously" toggle when sending the iPerf job like for Ping, that will restart the job after it completes, so each iPerf instance runs for a period of time, but then starts again after it's returned?

hajoha commented 2 months ago

Hi Nick,

Thank you for informing us. I'm not entirely sure this is a bug, as we're using the Worker API.

We have three Workers:

  1. Iperf3Worker
  2. Iperf3ToLineProtocolWorker
  3. Iperf3UploadWorker

These workers are chained together:

iperf3WM.beginWith(iperf3WR).then(iperf3LP).then(iperf3UP).enqueue();

If the Iperf3Worker never stops running, the other two will not be called. For our current use case, it doesn't make sense to upload iPerf3 data while running an iPerf3 test.

However, I share your frustration with the current setup. In the future, it would be ideal to configure multiple iPerf3 tests (running either in parallel or sequentially) and allow them to run continuously.

A potential solution for now could be to stop the iPerf3 run and upload the data via the GUI. I'm currently unable to test this myself, so please let me know if it works.