Comparing version 0.1.9 to 0.1.10
@@ -12,2 +12,3 @@ 'use strict'; | ||
var util = require('util'); | ||
var crypto = require('crypto'); | ||
var Log = require('log'); | ||
@@ -57,3 +58,3 @@ var microtime = require('microtime'); | ||
{ | ||
requestId = requestId || Math.floor(Math.random() * 0x100000000).toString(16); | ||
requestId = requestId || createId(); | ||
requests[requestId] = microtime.now(); | ||
@@ -235,3 +236,14 @@ return requestId; | ||
/** | ||
* Create a unique, random token. | ||
*/ | ||
function createId() | ||
{ | ||
var value = '' + Date.now() + Math.random(); | ||
var hash = crypto.createHash('sha256'); | ||
return hash.update(value).digest('hex').toLowerCase(); | ||
} | ||
/** | ||
* Test latency ids. | ||
@@ -238,0 +250,0 @@ */ |
{ | ||
"name": "loadtest", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Load test scripts.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://milliearth.org/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39993
1391