-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BackendListener that sends "raw" results to InfluxDB #544
Conversation
Codecov Report
@@ Coverage Diff @@
## master #544 +/- ##
============================================
+ Coverage 55.33% 55.37% +0.04%
- Complexity 9960 9976 +16
============================================
Files 1033 1035 +2
Lines 63345 63399 +54
Branches 7157 7159 +2
============================================
+ Hits 35052 35109 +57
+ Misses 25818 25815 -3
Partials 2475 2475
Continue to review full report at Codecov.
|
fed71d1
to
bbcf292
Compare
e3ba370
to
f477c5e
Compare
6c3e04d
to
af53f31
Compare
af53f31
to
df4d26e
Compare
df4d26e
to
eba22f2
Compare
eba22f2
to
be98a04
Compare
4711d5a
to
f07e070
Compare
f07e070
to
4bb3ec4
Compare
4bb3ec4
to
62ceeb9
Compare
Any thoughts on this one - is there more that needs doing or is this ok to mergE? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ham1 ,
It looks good to me.
@vlsi , @FSchumacher any thoughts ?
Thanks
def koSample = new SampleResult() | ||
koSample.setSampleLabel("myLabel") | ||
expect: | ||
sut.createTags(koSample) == "status=ko,transaction=myLabel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this look like a call to a private method?
Frankly speaking, I don't think we should encourage that type of tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, I'd be interested in any ideas you have to test this, would it be better to make the method public marked with @PublicForTesting
?
def defaultContext = new BackendListenerContext(sut.getDefaultParameters()) | ||
|
||
def createOkSample() { | ||
def now = System.currentTimeMillis() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is currentTimeMillis
needed here?
Can a constant be used instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be, what would be the advantage of using say 1 or 1585413149344, vs. this call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a fixed value in test helps to keep the test reproducible, and it helps to avoid unexpected timezone issues.
If you want to exercise timezone issues, please create a separate test for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
I'm not sure it is worth adding yet another Listerer implementation. It looks like the users would have to copy-paste the configuration if they want to switch between raw and grouped data. |
In a parallel universe, there's https://gitlab.com/testload/jmeter-listener (MIT) |
IMO this one complements the other one and will be more precise
Is this a big deal ? |
Have you tried it ? |
I think it is. For instance, what if we add
Having 3-4 "similar in-core listeners that send data to InfluxDB" would be confusing. |
One of the options is to bundle the plugin into the final distribution (like we bundle lots of third-party dependencies). I have not tried that myself, however, their wiki says there are reasons to group data before sending:
|
fea4cb4
to
8585791
Compare
This plugin has indeed good ideas, but implementation should be improved if embedded in JMeter (https://gitlab.com/testload/jmeter-listener/-/issues). |
If we don't like the idea of another listener for this use case how might we allow the current implementation to be customised? |
53c6a8b
to
3686ad7
Compare
bd7b3bc
to
2a4737a
Compare
13e9db1
to
121c259
Compare
Hello @ham1 , Regarding this PR, did you have the opportunity to test it on a "real life" performance test ? What were the use cases ? and related volumes ? Thanks |
Hello. Yes I did. But I seem to have messed up rebasing so I'll have a look at it again towards the end of the month. I can try to compare the performance of this vs. the existing one, but I'd expect it to be slightly worse but that's a choice for the user based on their use case and need for higher resolution of results in Influx. |
e51b436
to
ee541c8
Compare
Added default impl of BackendListenerClient#createSampleResult Added overloaded UdpMetricsSender and HttpMetricsSender#addMetric to include custom timestamp Improved JavaDocs
Also, removing these defaults from AbstractBackendListenerClient.
ee541c8
to
f414151
Compare
f414151
to
1c89b04
Compare
Is there a way to submit the raw requests in batches? |
Afraid not. How many req/s are you currently testing with? Would be interested to know what you discover if you try it out. This PR was to allow more accurate results, especially with low RPS tests, so I didn't add the extra complexity of batching. |
Sorry for missing this earlier, Graham Russell. Relates to #544
* Implemented InfluxDBRawBackendListenerClient and tests Added default impl of BackendListenerClient#createSampleResult Added overloaded UdpMetricsSender and HttpMetricsSender#addMetric to include custom timestamp Improved JavaDocs * Added documentation for InfluxDBRawBackendListenerClient * Add whitespace and improved InfluxdbBackendListenerClientSpec * Add default implementation to BackendListenerClient. Also, removing these defaults from AbstractBackendListenerClient. * Improve BackendListenerClient JavaDoc * http -> https in docs plus some formatting. * Influxdb -> InfluxDB and whitespace * Update InfluxDB Raw Listener docs * Used fixed timestamp for test and remove unused import * Fix error prone error
Sorry for missing this earlier, Graham Russell. Relates to apache#544
Hi everyone!
|
Description
Add
BackendListener
that sends "raw" results to InfluxDB.Instead of summarised statistics this listener sends the raw results for each sample to InfluxDB.
In its current form it sends connect time, ttfb (latency) and duration.
Are there other metrics that would be essential to send?
Added extra method to
InfluxdbMetricsSender
:public void addMetric(String measurement, String tag, String field, long timestamp)
.This is a draft PR to start a discussion about what more needs to be done or could be done before including.
Motivation and Context
As can be seen from the below graphs, in a low TPS situation the current InfluxDB listener has a misleading max value and you lose a lot of detail with avg etc.
In a slightly higher TPS test you can see that the time is slightly off (due to the listener using
System.currentTimeMillis()
instead of the sample end (or start) time) and also interesting details are lost due to the summary nature of the listener.How Has This Been Tested?
Tested with a few simple test plans against a local InxlufDB and Grafana, and also the Influx cloud 2.0.0.
Screenshots (if appropriate):
Types of changes
Checklist: