Shell scripting, yeah…?
After a nice session of #dungeonsanddragons I thought I take another nightly hour to work a bit more on my side project. Because I did some initial performance tests with promising results, I wanted to create some more elaborate but still simple test suite for exactly this.
The idea: Write a script that runs a couple of curl commands in parallel to do kind of a load test. It’s not very scientific but it would give a good overview of the API performance.
Unfortunately I had to realize that running commands in parallel and in a loop is not as simple. There is GNU Parallel for exactly that but it’s really not as straightforward as I wish it to be.
And did you know that xargs can run parallel processes as well?! Just give it a -P 4 to run 4 processes. How cool is that? But it was just not working the way I wanted it to work so I gave up for today.
Do you speak Bash (or ZSH or whatever)? Tell me in the comments. In any language.