Avatar
Ruben Funai
5e2410aad36e4d926e27073b100f198c30caed85a7c14bd84ddcf6b35af1901c
I'm a Software Engineer, Devops Engineer, Linux Enthusiast, Encryption Enthusiast, PHP + Laravel fanatic, Argentine Australian living in Sydney.

IntelliJ Ultimate. But you can see my profile so not much of a guess 🤣🤣🤣

Replying to Name

Test

Test Passed āœ…ļø

Except for generics. But we'll get there šŸ˜….

At least we have doc blocks to help us out there šŸ»

You can do a simple profile of these metrics yourself like so:

For speed you can use microtime: https://www.php.net/manual/en/function.microtime.php

1. Store the microtime in a variable before calling your function.

2. Call your function

3. Store the micotime in anothee variable after the function call

4. Calculate a difference between the two variables to see how many microseconds the function took to run.

For Memory you can use memory_get_usage: https://www.php.net/manual/en/function.memory-get-usage.php

Repeat the process above but with memory_get_usage.

Depending on what your function does, you may also want to add some calls to memory_get_usage within the function itself and store the results in a global variable for later printing the results.

I hope this helps.

AdonisJS is getting pretty close! šŸ˜