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

create specified logger module to log performance #275

Closed
3 tasks done
hyzhak opened this issue May 5, 2018 · 0 comments
Closed
3 tasks done

create specified logger module to log performance #275

hyzhak opened this issue May 5, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request optimization improve performance

Comments

@hyzhak
Copy link
Member

hyzhak commented May 5, 2018

Usage

const {timer} = require('./utils/logger')('ia:selectors:condition-selector');

const stopLazyFunctionTimer = timer.start('lazy function');
//..do something
const stopInnerFunctionTimer = timer.start('inner function'); 
//..do something
stopInnerFunctionTimer(); // will log 'inner function' timer
//..do something
stopLazyFunctionTimer(); // will log 'lazy function' timer
  • cancel previous performance timer and warn when we already have the same name (it is very lickely that we missed timer.stop
  • log math.eval performance
  • log in the way: ia:selectors:condition-selector:performance 100ms lazy function
@hyzhak hyzhak self-assigned this May 5, 2018
@hyzhak hyzhak added enhancement New feature or request optimization improve performance labels May 5, 2018
@hyzhak hyzhak closed this as completed May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization improve performance
Projects
None yet
Development

No branches or pull requests

1 participant