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

Add timing information to events #1014

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Add timing information to events #1014

merged 1 commit into from
Mar 24, 2020

Conversation

LukeTowers
Copy link
Contributor

This fixes #390 and expands on #392. Additionally, the change to referencing the Dispatcher contract rather than the implementation allows for greater flexibility (specifically I'm using it with October CMS, which has its own event dispatcher that implements the Dispatcher contract).

While the timing information isn't 100% accurate, as the first event will be tracked if it took all of the time from when the collector was setup to when the event fired, and any future events are really just tracking the time between itself and the previous event, this is still valuable information that is close enough to reality to act upon. Additionally, this collector was setup from the start to track event timings, but was never actually implemented properly as it would record the start and end of the event as being the same time, always resulting in a timing of 0.

This fixes #390 and expands on #392. Additionally, the change to referencing the Dispatcher contract rather than the implementation allows for greater flexibility (specifically I'm using it with October CMS, which has its own event dispatcher that implements the Dispatcher contract).

While the timing information isn't 100% accurate, as the first event will be tracked if it took all of the time from when the collector was setup to when the event fired, and any future events are really just tracking the time between itself and the previous event, this is still valuable information that is close enough to reality to act upon. Additionally, this collector was setup from the start to track event timings, but was never actually implemented properly as it would record the start and end of the event as being the same time, always resulting in a timing of 0.
@LukeTowers
Copy link
Contributor Author

@barryvdh @GrahamCampbell could one of you review this and let me know your thoughts?

@barryvdh barryvdh merged commit 7fa9ff7 into barryvdh:master Mar 24, 2020
@LukeTowers LukeTowers deleted the patch-1 branch March 24, 2020 18:09
@LukeTowers
Copy link
Contributor Author

Thanks @barryvdh, I appreciate the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Events execution time is always 0μs.
2 participants