Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Performance Benchmarks and Tests #5114

Open
kitsunet opened this issue Jun 2, 2024 · 1 comment
Open

RFC: Performance Benchmarks and Tests #5114

kitsunet opened this issue Jun 2, 2024 · 1 comment

Comments

@kitsunet
Copy link
Member

kitsunet commented Jun 2, 2024

Discussions about how to benchmark and what to benchmark and which tools to use.

The more I look at it, the more I come to the conclusion that there cannot be one catchall tool for benchmarking such a complex beast as Neos. Just as with tests and code quality performance must be checked on different levels of integration and ideally with specialised tools.

I have identified the following "areas" for now that I would at least in mind treat differently:

database queries

Benchmarking databases is a highly specialized topic and I don't think code based benchmarks will do this too well unless it's really low level. Additionally DB performance is dependent on concurrency and some problems only come to light at higher concurrency, so this benchmark must include parallel execution, so either we create a thin wrapper around something like paratest or reactphp or rely on more low level tools for this.
mysqlslap is quite nice and comes with a typical mysql installation (also mariadb) and can laod everything from files as well. So we could generate testcases (files) from php and then execute them via mysqlslap to get numbers in concurrent execution.

simple PHP code

I call it simple, meaning anything that can run by just having an autoloader and putting classes together. This applies to the CR Core as well as to a bunch of low level Flow code (think PositionalArraySorter). A benchmark for the NodeTypeManager would be a good example here I guess.
This is probably were phpbench shines and with a little wrapper to load composer autoload this is good to go. Very similar to unit tests.

complex PHP code

This is anything that more or less needs Flow as a framework booted. Injections, ObjectManager, Configuration. From here it gets complicated. PHPBench is probably still our best bet, but just as for functional tests we need a big wrapper around it, to prepare everything and cleanup afterwards. Persistence is another topic on top.

full stack

We could consider starting the php buildin server and benchmarking requests against (test) controllers? The question is if this will give us any sensible information at all. I would wait with this even if on some level it's probably easiest to implement.

related: #4388

@kitsunet
Copy link
Member Author

kitsunet commented Jun 2, 2024

Nothing amazing but a first starting point for the "simple PHP code" part....

Screenshot 2024-06-02 at 23 32 21

@bwaidelich bwaidelich added the RFC label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants