From f84af3fcd7170bf1db9d72fbe96f28f45a09f404 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Wed, 12 Feb 2020 13:56:48 -0800 Subject: [PATCH] more info --- gun.js | 5 +++-- lib/store.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gun.js b/gun.js index 212f7cdd..e2b30183 100644 --- a/gun.js +++ b/gun.js @@ -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) } diff --git a/lib/store.js b/lib/store.js index f05f388d..7e1e6dc6 100644 --- a/lib/store.js +++ b/lib/store.js @@ -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 }