Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/uuid-random/benchmark/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /*
Benchmark public UUIDv4 libraries
To run this benchmark, first install the following:
npm install portable-uuid pure-uuid simply-uuid uuid uuid-v4 fast-uuid id128
*/
var crypto = require('crypto');
var buf, i, start, seconds, ops = 40000;
start = + new Date;
for (i = 0; i < ops; i++) crypto.randomBytes(4096);
seconds = ((+new Date) - start) / 1000;
console.log('crypto.randomBytes(4096)', (ops/seconds) + " ops/sec");
start = + new Date;
for (i = 0; i < ops; i++) crypto.randomBytes(2048);
seconds = ((+new Date) - start) / 1000;
console.log('crypto.randomBytes(2048)', (ops/seconds) + " ops/sec");
start = + new Date;
for (i = 0; i < ops; i++) crypto.randomBytes(1024);
seconds = ((+new Date) - start) / 1000;
console.log('crypto.randomBytes(1024)', (ops/seconds) + " ops/sec");
start = + new Date;
for (i = 0; i < ops; i++) crypto.randomBytes(512);
seconds = ((+new Date) - start) / 1000;
console.log('crypto.randomBytes(512)', (ops/seconds) + " ops/sec"); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |