Comments (18)
@codesenberg , I was thinking about creating a PR for this. Do you have any view on this one?
from bombardier.
I was thinking about adding two flags --print (-p)
and --format (-f)
, so users could do something like:
bombardier [other flags...] --print=result --format=json <url>
and get something like:
{
"attack": {
// attack parameters, i.e url, number of conns., etc.
},
"requests_per_second": {
"avg": 1000,
"stdev": 200,
"max": 2000
},
"latency": {
// durations are in microseconds
"avg": 20000.2,
"stdev": 5000.0,
"max": 100000.0,
// if --latencies flag is used
"percentiles": {
"50": 19200.0,
"75": 21000.0,
"90": 23000.0,
"99": 31000.0,
},
},
// throughput is in bytes per second
"throughput": 10000.0,
"codes": { /* HTTP status codes */ },
// some other things I could forget
}
With this you could transform said JSON into the format you need. Sounds good?
As for the UUID, you could run some script, like this one:
(python -c "import sys,uuid; sys.stdout.write("test_uuid: " + uuid.uuid4().hex + '\n')" && bombardier --print=result --format=json <url> | transform-bombardier-output-to-prometheus-format) > bombardier.prom
from bombardier.
Just to clarify a little bit --print=result
means that only the stats will be printed. No intro and no progress bar.
from bombardier.
@greenpau, you know, we could actually step a bit further and just add prometheus
to the list of formats understood by the --format
flag, saving users from the hassle of transforming json into prometheus's text format.
from bombardier.
add prometheus to the list of formats understood by the --format flag,
vot eto razgovor 👍
from bombardier.
Hey, @greenpau, how important that UUID thing for your use case? I plan to implement user-defined templates, so if it's somewhat important (granted I will in fact implement them), I could add some func UUID() (string|something)
helper.
from bombardier.
UUID thing for your use case?
@codesenberg , it is pretty important, because it allows to store that transaction in other systems (and later correlate it), e.g. elasticsearch
. Consider reading https://discuss.elastic.co/t/elastic-search--id-uuid-format/28801/4 for insights.
from bombardier.
The I'll probably add helpers for all five versions of it from this library.
Sounds good to you?
from bombardier.
The I'll probably add helpers for all five versions of it from this library.
That's sounds great! 👍
from bombardier.
Ok, user-defined templates landed on master just now. Let me know if everything is in place to generate the output you want.
from bombardier.
Ok, user-defined templates landed on master just now. Let me know if everything is in place to generate the output you want.
@codesenberg , 👍
from bombardier.
Hello @codesenberg,
Let me know if I can help you with the prometheus side.
from bombardier.
@tkanos, well, I don't know if there is some reasonable default output format for prometheus that we could use. Mainly, because I'm not too familiar with prometheus in general, but if there is one, then sure, we could add it.
from bombardier.
By the way. @greenpau, have you succeeded in your endeavor to generate prometheus compatible output by using user-defined output templates?
from bombardier.
@codesenberg,
Well we can define all the output of bombardier to be scraped by Prometheus, but Prometheus is a time series database, and benchmark is done time to time (or in the CI/CD path), so there is (for me) no real sense.
And the guy that wants to have it, will have to configure Prometheus to scrap the endpoint that we will have to provide. And if he configure it to scrap each 15 sec, and do a benchmark of 5s, He will not have any information, and then after the benchmark he will have to remove his config.
It could have sense in a benchmark Suite, where all benchmark are managed by a web application, that runs all benchmark of all projects, and provide the info to prometheus, but it's not the goal of Bombardier.
Or do what @greenpau is doing, a prom generated, that we can generate during the CI/CD and provide it to prometheus to alert if we have an issue.
from bombardier.
By the way. @greenpau, have you succeeded in your endeavor to generate prometheus compatible output by using user-defined output templates?
@codesenberg , unfortunately, I am tied doing other things at the moment. I think the way you did is with templates is great, because then, using that same templating technique, you could generate Elasticsearch inserts. Once I get back to app testing, I will post in here.
from bombardier.
@tkanos, let's leave things as they are then. (At least for the time being.)
from bombardier.
I'll close this one, since more than two years passed already. Unlikely that we'll hear any feedback 😄
from bombardier.
Related Issues (20)
- Odd redirects caused by bombardier appending the default port to the request URLs, when the original URL for testing had none HOT 3
- Another user previously encountered similar issue in #21. In short, currently you'll have to craft the body yourself.
- For some servers wall time significantly exceeds the expected duration of the test when fasthttp client is used HOT 3
- Bug when using more than one query parameter HOT 1
- can't pass trivy scan HOT 1
- Feature Request: Validate Responses
- Report stats during the test HOT 1
- Can the stress test of random parameters be realized? HOT 1
- 'http2: no cached connection was available' when receiving goAway frame during load test
- Can the stress test using different parameters within on testflow HOT 3
- body not allowed for GET HOT 1
- new release tag? HOT 2
- Unable to connect with h2c - HTTP/2 clear text protocol HOT 1
- Implement min HOT 1
- bombardier version unspecified HOT 2
- Option to save response of the request HOT 6
- How can I send a basic post request with headers and a json body? HOT 1
- incorrect computation of stddev? HOT 1
- missing windows arm64 build product HOT 1
- auto calculated boundary in large file uploading in asp.net core and testing with bombardier HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bombardier.