test for guntest peer

This commit is contained in:
Mark Nadal 2020-03-12 14:52:43 -07:00
parent 09dbdc57b8
commit 6223e1a294
2 changed files with 2 additions and 1 deletions

1
gun.js
View File

@ -2123,6 +2123,7 @@
//ECHO = msg.put || ECHO; !(msg.ok !== -3740) && mesh.say({ok: -3740, put: ECHO, '@': msg['#']}, peer);
DBG && (DBG.hd = +new Date);
console.STAT && (ST = +new Date - S) > 9 && console.STAT(S, ST, 'msg'); // TODO: PERF: caught one > 1.5s on tgif
if(ST > 1000){ require('fs').writeFile('./stats.msg.radata', JSON.stringify(msg, null, 2), noop) }
dup_track(id).via = peer;
mesh.leap = null; // warning! mesh.leap could be buggy.
}

View File

@ -9,7 +9,7 @@
"android": "browser.android.js",
"scripts": {
"start": "node --prof examples/http.js",
"debug": "node --prof-process --preprocess -j isolate*.log > v8.json && rm isolate*.log && echo 'drag & drop ./v8.json into https://mapbox.github.io/flamebearer/'",
"debug": "node --prof-process --preprocess -j isolate*.log > v8data.json && rm isolate*.log && echo 'drag & drop ./v8data.json into https://mapbox.github.io/flamebearer/'",
"https": "HTTPS_KEY=test/https/server.key HTTPS_CERT=test/https/server.crt npm start",
"prepublishOnly": "npm run unbuild",
"test": "mocha",