-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
133 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
var axm = require('../../..'); | ||
|
||
var probe = axm.probe(); | ||
|
||
var users = { | ||
'alex' : 'ok', | ||
'musta' : 'fa' | ||
}; | ||
|
||
/** | ||
* Monitor synchronous return of functions | ||
*/ | ||
var rt_users = probe.metric({ | ||
name : 'Realtime user', | ||
historic : false, | ||
type : 'v8/smthing', | ||
value : function() { | ||
return Object.keys(users).length; | ||
} | ||
}); | ||
|
||
setInterval(function() { | ||
// keep event loop active | ||
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var pmx = require('../../..'); | ||
var probe = pmx.probe(); | ||
|
||
probe.histogram({ | ||
name : 'test' | ||
}); | ||
|
||
probe.metric({ | ||
name : 'metric-test' | ||
}); | ||
|
||
probe.counter({ | ||
name : 'counter-test' | ||
}); | ||
|
||
probe.meter({ | ||
name : 'meter-test' | ||
}); | ||
|
||
setInterval(function() { | ||
// keep event loop active | ||
}, 1000); |
2 changes: 1 addition & 1 deletion
2
test/fixtures/probe.fixture.js → test/fixtures/probe.mocha/probe.fixture.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
var axm = require('../..'); | ||
var axm = require('../../..'); | ||
|
||
var probe = axm.probe(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters