You can use the function threadCount() from this module to indicate the number of threads on your cpu.
An electron-vue project