Created
September 26, 2018 10:44
-
-
Save rpf5573/e841f0a9e0670c322d775b1b759ea00a to your computer and use it in GitHub Desktop.
thread count 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.env.UV_THREADPOOL_SIZE = 5; | |
const crypto = require('crypto'); | |
const start = Date.now(); | |
crypto.pbkdf2( 'a', 'b', 100000, 512, 'sha512', () => { | |
console.log( '1:', Date.now() - start ); | |
}); | |
crypto.pbkdf2( 'a', 'b', 100000, 512, 'sha512', () => { | |
console.log( '2:', Date.now() - start ); | |
}); | |
crypto.pbkdf2( 'a', 'b', 100000, 512, 'sha512', () => { | |
console.log( '3:', Date.now() - start ); | |
}); | |
crypto.pbkdf2( 'a', 'b', 100000, 512, 'sha512', () => { | |
console.log( '4:', Date.now() - start ); | |
}); | |
crypto.pbkdf2( 'a', 'b', 100000, 512, 'sha512', () => { | |
console.log( '5:', Date.now() - start ); | |
}); | |
// output | |
// 2: 2955 | |
// 1: 2976 | |
// 3: 2987 | |
// 4: 2996 | |
// 5: 3004 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment