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

worker: add eventLoopUtilization() #35664

Closed
wants to merge 2 commits into from

Commits on Oct 23, 2020

  1. test, doc: improve ELU test and fix doc error

    * Place all callbacks in mustCall().
    * Force idle time to accumulate before allowing the test to proceed.
    * Add doc info that ELU is always available in worker threads.
    trevnorris committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    b8053af View commit details
    Browse the repository at this point in the history
  2. worker: add eventLoopUtilization()

    Allow calling eventLoopUtilization() directly on a worker thread:
    
        const worker = new Worker('./foo.js');
        const elu = worker.performance.eventLoopUtilization();
        setTimeout(() => {
          worker.performance.eventLoopUtilization(elu);
        }, 10);
    
    Add a new performance object on the Worker instance that will hopefully
    one day hold all the other performance metrics, such as nodeTiming.
    
    Include benchmarks and tests.
    trevnorris committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    076fa86 View commit details
    Browse the repository at this point in the history