Sample output only

I have a function that is really high volume, around 300K per minute, and it pretty much floods the influxdb instance I’ve got running until it breaks.

Any way of sampling the output of this request say 10% only to be reported.

Hi there,

unfortunately there’s currently no easy way of accomplishing this.

There’s an open issue about configuring a test run to not output certain metrics (#1321), and it’s on our short-term roadmap, possibly to be released in an upcoming version. I suggest reading the issue for background information and following it for updates.

There’s an interesting proposal by a contributor that accomplishes what you need specifically for InfluxDB, but it’s been almost 2 years since then and I doubt their patch applies cleanly to the current master. That said, if you’re comfortable with Go, you can take a look at the commit and try to port it and build your own k6 binary. It’s not a lot of code, looks relatively straightforward, and it seems to do what you need.

If anyone else has any other ideas, feel free to jump in.

Good luck!

Thanks,

That change looks promising so I’ll keep an eye on it. I’m not a Go person but will have a look at that extension.

This is a blocker for our migration, at peak we will be generating around 15-20K transactions per second and we don’t want to have to retrofit K6 into our jmeter solution (file beats, logstash, elastic search) as it’s a pain to maintain separate sources (although it does work as a good filter for unwanted transactions).

In the meantime I’ll focus on migrating our low volume functions and working with our dev teams to integrate into our pipelines.

@BobRuub I would recommend forking the influxdbv2 output and doing what you need to filter there. Depending on the changes this could be a pretty small change.

Or use an instance of telegraf to the same I have done partially that as shown here.