tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
759 stars 69 forks source link

HTML Report adds 0ms Response Time Datapoints #526

Open mTsBucy1 opened 1 year ago

mTsBucy1 commented 1 year ago

The HTML report is really nice, but one thing that bothers me is that when no request has been made in a given second, the value defaults to 0ms. This is fine for number of requests but doesn't make sense for response time.

For comparison here are the same data, first as it is now and second with the 0ms datapoints removed via sd: sd '\["\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d",0\.0\],' '' report.html, echarts handles it just fine. with_0ms_datapoints without_0ms_datapoints

I've skimmed through the code, and I think changing TimeSeriesValue::get_graph_value to return a Option<T> instead of a T and then filtering based on that might be a viable approach.

mTsBucy1 commented 1 year ago

I will close this issue as I've noticed several problems with my proposed solution. Even though for some cases the graphics look much better, they tend to look worse. Thus, this shouldn't be a change in the code. Instead, I recommend using the sd command stated above if you desire.

jeremyandrews commented 1 year ago

Re-opening. The reported issue sounds like something we should be able to fix.

mTsBucy1 commented 1 year ago

Here an example of what I meant with "tend to look worse". The spans between the peaks are spanned with distracting lines that interpolate data that shouldn't be interpolated. In those (common) cases, setting them to 0 gives nicer graphics while the request log metrics are unaffected.

The only solution I see is to revamp the graph to not interpolate between datapoints which are too far away, which seems overkill. There are other shortcomings of the html request that should be addressed with higher priority than this.

image