perrig / scionlab

Software for supporting SCIONLab
Apache License 2.0
3 stars 7 forks source link

Add bwtester graph and continuous testing #44

Closed mwfarb closed 6 years ago

mwfarb commented 6 years ago

Also:

mwfarb commented 6 years ago

@perrig @chaehni This is ready for testing and review. Here is a screen shot: screenshot from 2018-07-05 13-27-43

mwfarb commented 6 years ago

In Chrome, there is a bug where, after continuous testing is switched off again, the tabs are not re-enabled.

mwfarb commented 6 years ago

Running a continuous test on Ubuntu, in Firefiox, while running a Hangouts call produced some performance issues. The graph kept running, but the the test seemed to run way too long. The video consumes much bandwidth, but it seems like we should have better notification on the graph somehow.

chaehni commented 6 years ago

Sorry for my late feedback. I had some problems getting the bwtester to run after the update. I had a look at this new feature and it looks great! Two suggestions:

mwfarb commented 6 years ago

I've had a look about the performance issues when continuous testing is run > 5 minutes or so. Based on that and consulting with a colleague, I think 2 things should change:

  1. The graph update drawing intervals need to be throttled down in the JS layer when the tab loses focus, otherwise the setInterval() messages for tests and graph ticks stack up. For now the test execution timer can stay in JS as is, and the drawing timer throttle should keep the message queue free to avoid interfering with the test execution timer.
  2. The test execution interval timer should move to the Go layer, since the JS timer must ultimately obey the browser's whim to be responsive. This should be done in a separate PR since there are many architectural changes needed to make that happen.

I'll send another commit when issue 1 and the above comments are ready for review again.

mwfarb commented 6 years ago

@chaehni I've addressed your comments and worked on performance as noted above.

chaehni commented 6 years ago

@mwfarb I ran some longer tests: When I run the continuous test in the background (browser not in focus) and then come back after ~10min the site is no longer responsive. Sometimes the UI gets restored but the server has to be restarted to make it functional again.

The UI looks good to me. However, I just noticed that the dials behave weird (probably because they are non-standard inputs):

mwfarb commented 6 years ago

@chaehni Thanks for your feedback and testing. As discussed today, I'll work on solution 2 above as well and provide another commit. Hopefully it goes quickly.

mwfarb commented 6 years ago

@chaehni The re-architecture is complete now to move the continuous bwtest to the Go code in this updated commit. The browser has been responsive for me over long periods now. Let me know how it it working for you. I know this has generated quite a bit more code, but hopefully you have time to test and review the code changes.

Now, a loop will run on the webserver which the user will signal to turn on and off and request graph updates from. The test results are stored in a SQLite database and also written to CSV files for export (click Download Data in the graph for CSV). To accomplish this, quite a bit of Go in webapp has been created/moved into webapp/lib and webapp/models to keep files readable and less bloated.

I needed some up with some timeouts for the new structure:

I've added 2 of your comments about the dial irregularities to #40 to be handled when we update the dials. The delete bw dial issue was a infinite feedback js loop and has been fixed here.