Live data from Hacker News

Show HN: K6 – developer-centric load testing using Go and JavaScript

k6.io

11–20 of 26 posts

Re: Show HN: K6 – developer-centric load testing using Go and JavaScript

#11

At work, we had to do some load testing and we used Vegeta: https://github.com/tsenart/vegeta Had anyone used both to point out the main differences from k6?

I am of course biased, but I have used Vegeta. I did a writeup on it, and a bunch of other load testing tools in this article: http://blog.loadimpact.com/open-source-load-testing-tool-rev...

The single biggest difference is that k6 lets you write test cases in real code (JavaScript), while Vegeta will only let you supply a static list of URLs to hit. Vegeta has some things k6 does not have, to be fair (like constant RPS-rate load), but k6 was created to address what we saw as missing in Vegeta and most of the other existing tools. We think developers want to write code to test things, so we created a tool that lets you use JavaScript + a scripting API designed for load testing and automation.

Re: Show HN: K6 – developer-centric load testing using Go and JavaScript

#12
post #6

Earlier quoted context omitted.

No, there is currently no support for websockets. We have been asked for this a couple of times though, and are considering bumping up the priority for a websockets implementation. As of now, k6 can do standard http, https (and it also supports HTTP/2)

Thanks for the info! Would love ws suppprt!

If you're interested, here is the Github issue for Websockets support in k6: https://github.com/loadimpact/k6/issues/178

We'd really appreciate any comments/feedback you may have on exactly how it should be implemented.

Re: Show HN: K6 – developer-centric load testing using Go and JavaScript

#13
post #9
post #5

Earlier quoted context omitted.

Thanks for the nice words! If you see anything missing, don't hesitate to create an issue about it on Github ( https://github.com/loadimpact/k6 ). We're trying really hard to build the things people ask for. About CSV output though, we have JSON output with single request timings, see https://docs.k6.io/docs/results-output#section-json-output Is JSON useful to you, or do you prefer CSV?

That looks like what I'm looking for, thanks! Is there documentation of the format of those JSON logs? CSV would probably be a useful addition just for ease of ingestion into analysis tools and databases. Once I get a chance to test this out, I'll definitely report any issues through GH.

I'll update the docs with some info on the JSON format first thing on monday!

If you should happen to try out k6 in the meantime, most of the JSON contents should be recognizable/understandable just by looking at the output, if you know what metrics k6 collects (which is documented on docs.k6.io). You can try running with e.g. 2 VUs for 2 iterations, to get a tiny amount of output data but something that looks like a real load test: k6 run --vus 2 --iterations 2 --output json=output.json script.js

Re: Show HN: K6 – developer-centric load testing using Go and JavaScript

#19
post #17

The params of http.get are not documented. Is it possible to specify a random timeout for every http request to simulate long poolling?

Thanks, I'll make sure the "params" object gets documented also. Currently, there is not so much you can set per HTTP request. You can basically add HTTP headers and you can also add tags that lets you single out specific results based on those tags (e.g. when using thresholds or when plotting graphs of results).

So - HTTP request timeouts can not be changed at the moment, but this is something I think would be very simple to implement. If you open an issue about it I'll see what we can do to get it implemented quickly.

Re: Show HN: K6 – developer-centric load testing using Go and JavaScript

#20

Any plans to support distributed testing (e.g. like Tsung) or at least the ability to aggregate results once you've run it manually on multiple nodes?

Yeah, we have this issue: https://github.com/loadimpact/k6/issues/140

But you can actually aggregate results already, if you use InfluxDB as results storage: you can have multiple k6 instances push results data to the same InfluxDB instance. Results are just time series samples, so there are basically no bad effects if you do this - you get all the results in a single db, with correct time stamps. The only difficulty lies in orchestrating the multiple k6 instances so they're in sync and you get the traffic levels you want (i.e. they ramp up/down at the same time). But for a simple ramp configuration, or a config where you run at a stable traffic level, it shouldn't be a problem.

Post reply on HN