profiler(duration) {
        const worker = this.pickWorker();

        if (worker) {
            worker.profiler(duration);
        } else {
            // There might not be availble worker, let it start.
            setTimeout(() => this.profiler(duration), 500);
        }
    }
Run CPU Profiler and save result on main process directory

@param {number} duration
@returns {void}