GithubHelp home page GithubHelp logo

Comments (18)

greenpau avatar greenpau commented on June 8, 2024

@codesenberg , I was thinking about creating a PR for this. Do you have any view on this one?

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

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.

codesenberg avatar codesenberg commented on June 8, 2024

Just to clarify a little bit --print=result means that only the stats will be printed. No intro and no progress bar.

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

@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.

greenpau avatar greenpau commented on June 8, 2024

add prometheus to the list of formats understood by the --format flag,

vot eto razgovor 👍

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

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.

greenpau avatar greenpau commented on June 8, 2024

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.

codesenberg avatar codesenberg commented on June 8, 2024

The I'll probably add helpers for all five versions of it from this library.
Sounds good to you?

from bombardier.

greenpau avatar greenpau commented on June 8, 2024

The I'll probably add helpers for all five versions of it from this library.

That's sounds great! 👍

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

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.

greenpau avatar greenpau commented on June 8, 2024

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.

tkanos avatar tkanos commented on June 8, 2024

Hello @codesenberg,
Let me know if I can help you with the prometheus side.

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

@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.

codesenberg avatar codesenberg commented on June 8, 2024

By the way. @greenpau, have you succeeded in your endeavor to generate prometheus compatible output by using user-defined output templates?

from bombardier.

tkanos avatar tkanos commented on June 8, 2024

@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.

greenpau avatar greenpau commented on June 8, 2024

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.

codesenberg avatar codesenberg commented on June 8, 2024

@tkanos, let's leave things as they are then. (At least for the time being.)

from bombardier.

codesenberg avatar codesenberg commented on June 8, 2024

I'll close this one, since more than two years passed already. Unlikely that we'll hear any feedback 😄

from bombardier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.