more info

This commit is contained in:
Mark Nadal 2020-02-12 13:56:48 -08:00
parent cac59fbc12
commit f84af3fcd7
2 changed files with 4 additions and 3 deletions

5
gun.js
View File

@ -757,8 +757,9 @@
var set = ctx.set = {'':1};
;(console.STAT||'').p = +new Date;
all.err = obj_map(put, valid, msg);
Gun.log(S, +new Date - S, 'mix');
;(console.STAT||'').pe = +new Date;
Gun.log(S, +new Date - S, 'mix');
Gun.log(S, Object.keys(all.s||{}).length, 'mix #');
mid = ctx.node = ctx.state = u;
all(); // if synchronous
fire(ctx, ''); // if synchronous
@ -2133,7 +2134,7 @@
console.STAT.hp = +new Date;
}catch(e){return opt.log('DAM JSON parse error', e)}
if(!msg){ return }
if(msg.DBG_s){ opt.log(+new Date - (console.STAT.ps = msg.DBG_s), 'to hear', msg['#']) }
if(msg.DBG_s){ opt.log(+new Date - (console.STAT.os = msg.DBG_s), 'to hear', msg['#']) }
if(!(id = msg['#'])){ id = msg['#'] = Type.text.random(9) }
if(tmp = dup_check(id)){ return }
/*if(!(hash = msg['##']) && u !== msg.put){ hash = msg['##'] = Type.obj.hash(msg.put) }

View File

@ -16,7 +16,7 @@ Gun.on('create', function(root){
this.to.next(msg);
var id = msg['#'], put = msg.put, soul = put['#'], key = put['.'], val = put[':'], state = put['>'], tmp;
tmp = soul+esc+key; // soul+key; // be nice to move away from escaping
var S = (console.STAT||'').rp = +new Date;
var S = (console.STAT||'').rp = (console.STAT||'').rp || +new Date; // stat from batch synchronous start.
dare(tmp, {':': val, '>': state}, function(err, ok){
if(msg.ack){ msg.ack(err, ok || 1) } return; // REVISE THIS IN FUTURE!!!
if(err){ root.on('in', {'@': id, err: err}); return }