Live data from Hacker News

K6: Like unit testing, for performance

github.com

11–20 of 86 posts

Re: K6: Like unit testing, for performance

#11

I've used K6 as well. I like it bcoz it's code, but my (major) complaints are lack of auto-complete (intellisense) in IDE and debugging. Without those two, it's hard to do exploratory testing.

With a bit of typescript wrapping, you can gain autocompletion quite easily...

Re: K6: Like unit testing, for performance

#13
I also discovered K6 a few days ago, it looked quite nice and could be a good replacement for our Gatling tests.

We were initially looking for something slightly different though: we were interested to have perhaps less tests, but tests that would run much much more often (like every seconds or couple of seconds), in a continuous manner. Tue goal was to have something at the same time like a healtcheck (is it still working), like a performance test (does it answer in a timely manner) and like a validation test (does it answer the right result - the endpoints we wanted to test do "complex calculations"). Our best answer so far was to wrap K6 in an infinite loop, but I wonder if there could be something smarter.

Re: K6: Like unit testing, for performance

#16
In their documentation ( https://k6.io/docs/ ) they claim that

> JavaScript is not generally well suited for high performance. To achieve maximum performance, the tool itself is written in Go, embedding a JavaScript runtime allowing for easy test scripting.

How is it possible that pure go JavaScript interpreter (goja) with bindings for net/http and some reports would be faster than the same tool written in nodejs using its http-client (which if I remember correctly is written in C)?

I don’t mean to downplay the importance or usefulness of k6, I just find their reasoning behind choosing go somewhat contrived

Re: K6: Like unit testing, for performance

#17
post #13

I also discovered K6 a few days ago, it looked quite nice and could be a good replacement for our Gatling tests. We were initially looking for something slightly different though: we were interested to have perhaps less tests, but tests that would run much much more often (like every seconds or couple of seconds), in a continuous manner. Tue goal was to have something at the same time like a healtcheck (is it still w…

> but tests that would run much much more often (like every seconds or couple of seconds), in a continuous manner.

That's an unusual expectation, especially with the noisiness of performance measurements.

Can you describe your use cases more?

Re: K6: Like unit testing, for performance

#18
post #16

In their documentation ( https://k6.io/docs/ ) they claim that > JavaScript is not generally well suited for high performance. To achieve maximum performance, the tool itself is written in Go, embedding a JavaScript runtime allowing for easy test scripting. How is it possible that pure go JavaScript interpreter (goja) with bindings for net/http and some reports would be faster than the same tool written in nodejs usi…

My guess would be that startup times to load all the JS libraries needed for a full tool would take quite a while.

In build scripts, it's important that you can start up each task (k6 instance) very fast.

Post reply on HN