takeSnapshot() {
        const worker = this.pickWorker();

        if (worker) {
            worker.takeSnapshot();
        } else {
            // There might not be availble worker, let it start.
            setTimeout(() => this.takeSnapshot(), 500);
        }
    }
Take Heap Snapshot and save result on main process directory

@returns {void}