mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
17 lines
239 B
JavaScript
17 lines
239 B
JavaScript
|
|
const pmx = require('pmx');
|
|
const Probe = pmx.probe();
|
|
|
|
var data = 10;
|
|
|
|
var metric = Probe.metric({
|
|
name : 'Realtime user',
|
|
value : function() {
|
|
return data;
|
|
}
|
|
});
|
|
|
|
setInterval(function() {
|
|
data = Math.random();
|
|
}, 500);
|