Closed bx80 closed 8 months ago
Added support for multiple threads using the Symphony\Process component, which this PR adds to the plugin composer dependencies. This is only used when the --threads=x
option is used and will divide the daily limit by the number of specified threads, for example, if generating data for 3 days with a 1,000 visit limit per day and 4 threads, then each thread would simultaneously run for all three days but with a 250 limit per day. All multi-process input will be captured and displayed by the parent process along with a total summary of generated data.
Nice work! There's somehow more to it than I envisaged 🙈 Had an initial look over the code and left a few questions, will try to run it locally as well.
@bx80 Left comments on slack thread regarding warnings being received, when there is no goal also when there is 1 goal.
Thanks for the review @AltamashShaikh :+1:
If there is no more review feedback, can someone in @matomo-org/plugin-reviewers merge this? (I don't have access).
Description:
This PR adds a new console command to the visitor generator which will directly insert fake visits into the database without using the tracker API.
This is intended for quickly creating large datasets where speed of data generation is more important than a perfect simulation of tracking requests.
Usage:
Unoptimized performance on basic hardware is currently 350 - 700 visits per second (~2,500 insert/s) compared to ~7 visits per second for visits generated using the normal tracker API method.
Fixes #138
Review