Commit 99ae056d authored by project's avatar project

--no commit message

--no commit message
parent f6d8a61a
......@@ -21,6 +21,7 @@
"express": "^4.14.0",
"node-persist": "^2.0.7",
"node-schedule": "^1.2.0",
"node-uuid": "^1.4.7",
"query-string": "^4.2.3",
"random-access-file": "^1.3.0",
"request": "^2.79.0"
......
module.exports = StorageService;
function StorageService(cfg)
{
this.config = cfg;
}
StorageService.prototype.start = function()
{
}
var ctx = require('../context');
var BSData = ctx.getLib('lib/model/bsdata');
// var BSData = ctx.getLib('lib/model/bsdata');
//var data = new Buffer('hello')
var data = "hello\nworld"
// var data = "hello\nworld"
//
// var bsdata = BSData.create(data);
//
// var sel = bsdata.serialize('object');
//
// console.log(sel.data);
var bsdata = BSData.create(data);
var uuid = require('node-uuid');
var sel = bsdata.serialize('object');
// console.log(uuid.v1());
//
const crypto = require("crypto");
//
//
//
// const id = crypto.randomBytes(16).toString("hex");
//
// console.log(id);
var cid = null;
console.log(sel.data);
var a=0;
var b=0;
for(var i=0;i<1000000000;i++){
if(i==0){
a= (new Date()).getTime();
}else if(i=1000000000-1){
b=(new Date()).getTime();
var c = b-a;
console.log(c);
}
//cid = uuid.v4()
var aid = crypto.randomBytes(12).toString("hex");
if(aid === cid){
console.log('cfggg');
}
cid=aid;
}
console.log(cid);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment