mirror of
https://github.com/amark/gun.git
synced 2025-11-26 15:35:59 +00:00
Update gun.js
This commit is contained in:
parent
85d34c4bde
commit
5c7e5c31b1
3
gun.js
3
gun.js
@ -1781,9 +1781,10 @@ if(!GUN.window){ return } // disable
|
|||||||
if(GUN.version < 0.2022){ return } // disable
|
if(GUN.version < 0.2022){ return } // disable
|
||||||
if(GUN.noAB || u !== GUN.testAXE){ return } // diable
|
if(GUN.noAB || u !== GUN.testAXE){ return } // diable
|
||||||
if(localStorage.noTest){ return } // disable
|
if(localStorage.noTest){ return } // disable
|
||||||
|
if(Math.random() > 0.01){ return } // reached ulimit, shrink sample size.
|
||||||
console.log("Debugging p2p 'torrent' latency. Disable with `localStorage.noTest=1`.");
|
console.log("Debugging p2p 'torrent' latency. Disable with `localStorage.noTest=1`.");
|
||||||
// TEST 1: Check if Rust has memory leak as idle websockets come/go.
|
// TEST 1: Check if Rust has memory leak as idle websockets come/go.
|
||||||
var s = +new Date, ws = new WebSocket(atob('d3NzOi8vZ3VuMDEuYml0Y2h1dGUueHl6L2d1bg'));
|
var s = +new Date, ws = new WebSocket(atob('d3NzOi8vZ3VuMDEuYml0Y2h1dGUueHl6L2d1bg'));
|
||||||
ws.onopen = function(){ GUN.latency = (+new Date - s) }
|
ws.onopen = function(){ GUN.latency = (+new Date - s) }
|
||||||
ws.onmessage = function(d){ GUN.last = d }
|
ws.onmessage = function(d){ GUN.last = d }
|
||||||
},9000) }());
|
},9000) }());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user