tests/performance/run.js
/**
 * Starts the next function in the `tasks` array.
 * If no task are available anymore, call the `onFinished` callback.
 */
Starts the next function in the `tasks` array.
If no task are available anymore, call the `onFinished` callback.
Starts the next function in the ` tasks ` array . If no task are available anymore call the ` onFinished ` callback .
function startNextTaskOrFinish() {
  if (nextTaskIndex > 0) {
    allSamples[(nextTaskIndex - 1) % 2].push(...currentTestSample);
  }
  currentTestSample = [];
  if (tasks[nextTaskIndex] === undefined) {
    onFinished();
  }
  nextTaskIndex++;
  return tasks[nextTaskIndex - 1]();
}
function startNextTaskOrFinish ( ) { if ( nextTaskIndex > 0 ) { allSamples [ ( nextTaskIndex - 1 ) % 2 ] . push ( ... currentTestSample ) ; } currentTestSample = [ ] ; if ( tasks [ nextTaskIndex ] === undefined ) { onFinished ( ) ; } nextTaskIndex ++ ; return tasks [ nextTaskIndex - 1 ] ( ) ; }
Starts the next function in the `tasks` array.
Starts the next function in the ` tasks ` array .