From dedab599d61e63e8048a16c7cf5981cd43da591e Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Thu, 12 Dec 2019 16:19:34 -0800 Subject: [PATCH] micro adjustment for calling a 2nd .once( with undefined --- axe.js | 2 +- examples/stats.html | 4 ++++ gun.js | 4 ++-- lib/stats.js | 2 +- package.json | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/axe.js b/axe.js index 9c00fde7..7f06c34e 100644 --- a/axe.js +++ b/axe.js @@ -288,7 +288,7 @@ var count = Object.keys(opt.peers).length; if(opt.mob >= count){ return } // TODO: Make dynamic based on RAM/CPU also. Or possibly even weird stuff like opt.mob / axe.up length? mesh.say({dam: 'mob', mob: count, peers: Object.keys(axe.up)}, peer); - setTimeout(function(){ mesh.bye(peer) }, 9); // something with better perf? + //setTimeout(function(){ mesh.bye(peer) }, 9); // something with better perf? // UNCOMMENT WHEN WE ACTIVATE THIS FEATURE }); at.on('bye', function(peer){ this.to.next(peer); diff --git a/examples/stats.html b/examples/stats.html index 8d1d72df..e6e53e67 100644 --- a/examples/stats.html +++ b/examples/stats.html @@ -53,6 +53,10 @@ $('#hours').text((data.up.time / 60 / 60).toFixed(0)); Stats('memory').line.append(+new Date, data.memory.heapTotal / 1024 / 1024); + try{ Stats('dam # in').line.append(+new Date, data.dam.in.count); }catch(e){} + try{ Stats('dam in MB').line.append(+new Date, data.dam.in.done / 1024 / 1024); }catch(e){} + try{ Stats('dam # out').line.append(+new Date, data.dam.out.count); }catch(e){} + try{ Stats('dam out MB').line.append(+new Date, data.dam.out.done / 1024 / 1024); }catch(e){} console.log('data',data); //fetch keys in all, these may be dynamically changing diff --git a/gun.js b/gun.js index 45156557..80ea8038 100644 --- a/gun.js +++ b/gun.js @@ -961,7 +961,7 @@ if(obj_has(back, 'put')){ back.on('in', back); } - if(tmp){ return } + if(tmp && u !== back.put){ return } //if(tmp){ return } msg.$ = back.$; } else if(obj_has(back.put, get)){ // TODO: support #LEX ! @@ -1174,7 +1174,7 @@ if(u === tmp && u !== at.put){ return true } neat.put = u; if(neat.ack){ - neat.ack = -1; // TODO: BUG? Should this be 0? + neat.ack = -1; // Shouldn't this be reset to 0? If we do that, SEA test `set user ref should be found` fails, odd. } neat.on('in', { get: key, diff --git a/lib/stats.js b/lib/stats.js index 6ccf8105..90be7c59 100644 --- a/lib/stats.js +++ b/lib/stats.js @@ -66,7 +66,7 @@ Gun.log = function(a,b,c,d){ if('number' == typeof a && 'number' == typeof b && 'string' == typeof c){ var tmp = (all[c] || (all[c] = [])); if(max < tmp.push([a,b])){ all[c] = [] } // reset - return; + //return; } return log.apply(Gun, arguments); } \ No newline at end of file diff --git a/package.json b/package.json index 84026804..5c1da0d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gun", - "version": "0.2019.1120", + "version": "0.2019.1211", "description": "A realtime, decentralized, offline-first, graph data synchronization engine.", "main": "index.js", "browser": "gun.js",