Skip to content

Conversation

ShelbyZ
Copy link
Contributor

@ShelbyZ ShelbyZ commented Sep 22, 2019

  • use process.hrtime() to track start/stop (supports nodeJS 8.x)
  • debug log estimated execution time in milliseconds

Not sure if requiring debug() is the correct way to report this information. We could also consider displaying a warning/error message if the estimated duration execeeds the defined limit.

Another approach to capturing timing would be to use perf_hooks to setup an observer and add measurements. The observer could process the measurements (logging) and disconnect.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

- use process.hrtime.bigint() to track start/stop
- debug log estimated execution time in milliseconds

Not sure if requiring debug() is the correct way to report this information.  We could also consider displaying a warning/error message if the estimated duration execeeds the defined limit.

Another approach to capturing timing would be to use perf_hooks to setup an observer and add measurements.  The observer could process the measurements (logging) and disconnect.
@ShelbyZ
Copy link
Contributor Author

ShelbyZ commented Sep 23, 2019

Hold off on this for now, I may convert this to use process.hrtime() since node 8.10 does not have process.hrtime.bigint(). and converted.

- fix trying to use process.hrtime.bigint() on nodeJS 6.x
- moving debug statement before error handling/return
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.

2 participants