Skip to content

Commit e23c878

Browse files
committed
Update _InternetSpeedTest.js
1 parent 20b89b2 commit e23c878

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

userMetrics/_InternetSpeedTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
//Requires the "speedtest-net" npm package (included in latest package.json)
33

44
exports.metrics = {
5-
PINGISP : { name:'PINGISP', regexp:/PINGISP\:([\d\.]+)/i, value:'', unit:'ms', pin:1, graph:1, graphOptions: { legendLbl:'Ping ms', lines: { lineWidth:1 }, colors:['#09c']} },
6-
DOWNSPEED : { name:'DOWNSPEED', regexp:/DOWNSPEED\:([\d\.]+)/i, value:'', unit:'ꜜ', pin:1, graph:1, graphOptions : { legendLbl:'Mb/s', lines: { lineWidth:1 }, colors:['#09c']} },
7-
UPSPEED : { name:'UPSPEED', regexp:/UPSPEED\:([\d\.]+)/i, value:'', unit:'ꜛ', pin:1, graph:1, graphOptions: { legendLbl:'Mb/s', lines: { lineWidth:1 }, colors:['#09c']} },
5+
PINGISP : { name:'PINGISP', regexp:/PINGISP\:([\d\.]+)/i, value:'', unit:'ms', pin:1, graph:1, graphOptions: { legendLbl:'Ping ms', lines: { lineWidth:1 }, yaxis: { min:1, max:200 }} },
6+
DOWNSPEED : { name:'DOWNSPEED', regexp:/DOWNSPEED\:([\d\.]+)/i, value:'', unit:'ꜜ', graphValSuffix:'Mbps', pin:1, graph:1, graphOptions : { legendLbl:'Mb/s', lines: { lineWidth:1 }, colors:['#09c']} },
7+
UPSPEED : { name:'UPSPEED', regexp:/UPSPEED\:([\d\.]+)/i, value:'', unit:'ꜛ', graphValSuffix:'Mbps', pin:1, graph:1, graphOptions: { legendLbl:'Mb/s', lines: { lineWidth:1 }, colors:['#0f0']} },
88
}
99

1010
//example of overriding a mote
@@ -26,7 +26,7 @@ exports.events = {
2626
if (nodeRightNow)
2727
{
2828
var speedTest = require('speedtest-net');
29-
var test = speedTest({maxTime: 10000}); //10 second test
29+
var test = speedTest({maxTime: 5000}); //5 second test
3030

3131
test.on('data', data => {
3232
var downspeed=data.speeds.download.toFixed(1); //1 decimal is enough

0 commit comments

Comments
 (0)