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

fix: only use performance.now when it is available #252

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

rickharris
Copy link
Contributor

Proposing an alternate solution to #251, since we're not sure if node's perf_tools module is going to work in the browser. We know that this will give us what we need for the internal analytics reporting, and doing it this way won't break for node users. If we need to make this public in the future, we can find a way to use either perf_tools or window.performance depending on whether the consumer is a browser or a node environment, but I think this is probably what we need for now.

@rickharris rickharris changed the title bugfix: only use performance.now when we it is available fix: only use performance.now when we it is available Apr 14, 2020
@tommoor tommoor changed the title fix: only use performance.now when we it is available fix: only use performance.now when it is available Apr 14, 2020
@berezovskyicom
Copy link
Contributor

Makes sense. Thanks @rickharris!

@berezovskyicom berezovskyicom merged commit d7744a3 into bugfix/perfomance-now Apr 15, 2020
@berezovskyicom berezovskyicom deleted the bugfix/perfomance-now-rick branch April 15, 2020 09:53
berezovskyicom pushed a commit that referenced this pull request Apr 20, 2020
* fix: add import perfomance from  perf_hooks (Node v8.5.0+)

* only take perf measurements when we know we need them (#252)

Co-authored-by: Vladimir Berezovsky <[email protected]>
Co-authored-by: Rick Harris <[email protected]>
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.

3 participants