News for hackers. Stuff that matters.
Re:Show HN: K6 – developer-centric load testing using Go and... by robbles on Saturday May 06, 2017 @01:55PM (#14281458)
This looks incredible for work I was previously using Tsung / Gatling for.

One request: please allow the output of either a) a CSV log of every request and it's timing or b) a configurable histogram of request timing, not just some percentiles and averages. That info is pretty much required for doing any more advanced analysis beyond "the service is fast enough". https://github.com/tsenart/vegeta does this really well (but doesn't have the scripting abilities of this tool).

Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Saturday May 06, 2017 @01:59PM (#14281472)
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?

Re:Show HN: K6 – developer-centric load testing using Go and... by robbles on Saturday May 06, 2017 @02:58PM (#14281696)
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.

Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Saturday May 06, 2017 @05:13PM (#14282292)
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... by rlonn on Saturday May 06, 2017 @05:04AM (#14279425)
k6 is our attempt at creating a modern, developer/devops-centric load testing tool suitable for automation. It is released as open source on Github, scriptable in JavaScript (ES6), and built on a Golang core that provides good speed and concurrency/scalability.
Re:Show HN: K6 – developer-centric load testing using Go and... by brunoluiz on Saturday May 06, 2017 @03:08PM (#14281735)
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?

Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Saturday May 06, 2017 @04:54PM (#14282205)
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... by lobster_johnson on Saturday May 06, 2017 @05:36PM (#14282396)
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?
Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Sunday May 07, 2017 @06:48AM (#14284834)
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.

Re:Show HN: K6 – developer-centric load testing using Go and... by lobster_johnson on Monday May 08, 2017 @08:57PM (#14296920)
Super, thanks. Didn't realize it had InfluxDB support.
Re:Show HN: K6 – developer-centric load testing using Go and... by tpetry on Sunday May 07, 2017 @04:44AM (#14284490)
The params of http.get are not documented. Is it possible to specify a random timeout for every http request to simulate long poolling?
Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Sunday May 07, 2017 @05:52AM (#14284670)
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... by goatofhehills on Saturday May 06, 2017 @01:14PM (#14281257)
Does this support websocket?
Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Saturday May 06, 2017 @02:01PM (#14281488)
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)

Re:Show HN: K6 – developer-centric load testing using Go and... by goatofhehills on Saturday May 06, 2017 @02:11PM (#14281534)
Thanks for the info! Would love ws suppprt!
Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Saturday May 06, 2017 @04:59PM (#14282225)
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... by softwarelimits on Saturday May 06, 2017 @02:56PM (#14281692)
Yes, websockets please! Great! Thank you!
Re:Show HN: K6 – developer-centric load testing using Go and... by rlonn on Monday May 08, 2017 @09:17AM (#14291184)
We just put up a $1000 bounty for Websockets support for k6: https://www.bountysource.com/issues/43973195-implement-suppo...
Re:Show HN: K6 – developer-centric load testing using Go and... by KirinDave on Saturday May 06, 2017 @10:49PM (#14283580)
Anything that uses Golang is by definition not developer centric.
Re:Show HN: K6 – developer-centric load testing using Go and... by pvg on Saturday May 06, 2017 @11:40PM (#14283719)
That's one hell of a persnickety definition.
Re:Show HN: K6 – developer-centric load testing using Go and... by KirinDave on Sunday May 07, 2017 @04:36PM (#14287511)
I knew it would be unpopular. I get a few u popular posts a year.

But I am very, very irritated by Golang while I am working with it on a daily basis.

It's entire design is informed by assuming that no developer should understand the codebase, but should instead read it over and over. Symmetrically, no insight can be offered in the code, only a rote transcription of an inductive design.

The net result is a language hostile to both those writing and those reading the code. No shortcuts are offered or taken. All error handling must be done manually. All data structures must be reimplemented over and over with different test suites for each one.

Re:Show HN: K6 – developer-centric load testing using Go and... by pvg on Sunday May 07, 2017 @08:18PM (#14288443)
Heh. You can't say I was wrong calling you persnickety, at least!
Re:Show HN: K6 – developer-centric load testing using Go and... by KirinDave on Sunday May 07, 2017 @09:41PM (#14288706)
I guess I'm gonna have to write a blog post about how hateful Go is.
Re:Show HN: K6 – developer-centric load testing using Go and... by raverbashing on Sunday May 07, 2017 @05:21AM (#14284595)
This website is written in Arc (Lisp), I guess it's not "developer centric" as well
Re:Show HN: K6 – developer-centric load testing using Go and... by KirinDave on Sunday May 07, 2017 @04:36PM (#14287513)
What?