Skip to content

Commit 276b424

Browse files
author
刘松
committed
modify readme .
1 parent eda3874 commit 276b424

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ var Falcon = require('node-open-falcon');
1515
var falcon = new Falcon({
1616
endpoint: os.hostname()
1717
});
18+
1819
//
19-
var usage = process.memoryUsage();
20-
for(var key in usage){
21-
falcon.metric('memory.' + key, usage[key]).end();
22-
}
20+
setInterval(function(){
21+
22+
var usage = process.memoryUsage();
23+
for(var key in usage){
24+
falcon.metric('memory.' + key, usage[key]).end();
25+
}
26+
falcon.send();
2327

24-
falcon.send();
28+
});
2529
```
2630

2731
### API

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "node-open-falcon",
2+
"name": "@myfe/open-falcon",
33
"version": "1.0.1",
44
"description": "open-falcon",
55
"main": "index.js",

0 commit comments

Comments
 (0)