Closed l0nax closed 4 years ago
This seems to be a bit hacky and there are no tests. Even if there were tests, I'd rather have some general solution that would allow this and other types of request generation. I had some functionality like that planned, but don't have time to implement features these days.
This PR adds a new flag named
randid
, when it's enabled it replaces<[_id]>
with a random uint32 in the request body.This means the following body:
will be replaced (for example) with the following content – if
randid
is enabled:To decrease the "random number generation time" I use fastrand, on my PC it was 94 % faster than the normal
math.rand
function.Raw benchmark results on my PC:
Since in #55 was discussed to implement another flag where the place holder values will be read from a file I'm unsure if this PR covers the complete requested feature of #55.
But since I'm also needed a possibility to have a "placeholder var" in the body I implemented this one with "random ID's".