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

Support for stacked profiler analysis #10551

Merged
merged 10 commits into from Jul 27, 2021
Merged

Conversation

annando
Copy link
Collaborator

@annando annando commented Jul 27, 2021

Until now the profiler could only be used for simple operations like database or file activities.

Now we support activities that call other actitivies that are profiled as well. With this we can better detect bottlenecks in more complex structures like the rendering.

@@ -58,7 +58,7 @@ class SessionFactory
*/
public function createSession(App\Mode $mode, App\BaseURL $baseURL, IConfig $config, Database $dba, ICache $cache, LoggerInterface $logger, Profiler $profiler, array $server = [])
{
$stamp1 = microtime(true);
$profiler->startRecording('parser');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this "parser" category? You replaced a few calls with "rendering" in other files of this same PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See some lines below. We use the "parser" key for the session stuff. And yes, this is quirky. And since "parser" is used for the cache handling, all the "parser" stuff moved to "rendering".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it "session" then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be too easy.

src/Util/Profiler.php Outdated Show resolved Hide resolved
src/Util/Profiler.php Show resolved Hide resolved
annando and others added 2 commits July 27, 2021 15:16
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
@annando
Copy link
Collaborator Author

annando commented Jul 27, 2021

friendica/friendica-addons#1149 has to be merged at the same time.

@MrPetovan MrPetovan merged commit 71a0c52 into friendica:develop Jul 27, 2021
@MrPetovan MrPetovan added this to the 2021.09 milestone Jul 27, 2021
@annando annando deleted the profiler branch July 27, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants