-
Notifications
You must be signed in to change notification settings - Fork 50
Added stopwatch plugin #102
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
Conversation
What happens if a custom stopwatch (either the httplug service or a completely custom one) is added to the plugin stack? |
If someone uses the default stopwatchPlugin we are doing the same calls to the stopwatch component twice. That means that our measured times would be twice as large. If someone uses the stopwatchPlugin with a custom stopwatch, then nothing special will happen. |
Okay, so probably we should add a check to see if the stopwatch plugin is already added? And then do what? Leave it as is, or remove that one and add our own to the beginning of the stack? |
Or just a check in the StopwatchPlugin to do nothing if the event is already started ? (there is a |
Our (the automatic one) stopwatch plugin is the first to execute though. |
But why would someone add their own stopwatch plugin? I we could figure out that use case it may be easier to know the appropriate action to take. |
I answering my own question now. The reason you may want to add the stopwatch plugin may be because you want to change the order. Say you have one slow plugin in the beginning that you want to exclude for the stopwatch. I believe we should check if the stopwatch is added and only prepend the plugin list if the stopwatch is missing. What do you think? |
Like that, but maybe we should only check our stopwatch plugin service. If someone creates a custom stopwatch plugin service, it might not use the same stopwatch instance. WDYT? |
Agreed. |
looks good! can you please rebase, there seems to be a conflict now. |
Sorry, I've now rebased the PR |
thanks! |
Thank you for merging |
What's in this PR?
With this PR we integrate with the WebProfiler timeline