-
Notifications
You must be signed in to change notification settings - Fork 3
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
Performance Benchmarks #52
Labels
Comments
WalterWoshid
added
documentation 📝
Improvements or additions to documentation
enhancement 🎆
New feature or request
labels
Sep 16, 2023
WalterWoshid
changed the title
Create Benchmarks to measure Performance
Performance Benchmarks
Sep 17, 2023
GitHub Workflow (PHP 8.1 - Okapi/AOP 1.2.7):
|
GitHub Workflow (PHP 8.2 - Okapi/AOP 1.2.7):
|
Arch Linux (PHP 8.2.9 - Okapi/AOP 1.2.7):
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I have added some performance benchmarks with various conditions.
Numbers test
The basic test consists of a
Numbers
class with the propertyint $number = 0
and the methodsget(): int
andadd(int $number)
.The
Numbers
test will include 4 cases:x
NumbersService
classes which act like the aspectsNumbersService
classes which modifies theNumbers
classy
timesx
aspectsNumbers
class with the applied aspectsy
timesTime complexity
I created a GitHub workflow
performance-tests.yml
and also run them locally on my machines. Below in the comments are the results. Comment your results, if you have a workstation or a server for a better comparison.Inspection
I have tested with Xdebug (
Okapi/AOP 1.2.4
) where the bottlenecks are and here is what I found:WovenClassBuilder::buildMethod() / (new Factory)->fromMethodReflection($refMethod)
takes some timeMeasurePerformanceTest::measurePerformance / $result = $numbers->get()
in the$useAspects
if statement, takes some time (both in the uncached and cached test), this could possible be made better with this issue: Remove JoinPointInjector if possible #53The text was updated successfully, but these errors were encountered: