You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,15 +35,18 @@ First, you need to spin up a timer. When doing so, you can assign the timer a `n
35
35
36
36
**name**: Okay, so the `name` will also be the name of the metric on CloudWatch. This means, this should be unique for every loop you want to measure. Whereas the `namespace` when requiring the module could be the same throughout the project.
37
37
38
-
**pulse**: The `pulse` is the number of seconds how often your timer pushed data to CloudWatch. E.g. if you set it to `5`, loop times will be averaged over five seconds and this average will be uploaded only. If you don't set a pulse, i.e. set it to `0`, each loop time will be uploaded immediately.
38
+
**pulse** (optional): The `pulse` is the number of seconds how often your timer pushed data to CloudWatch. E.g. if you set it to `5`, loop times will be averaged over five seconds and this average will be uploaded only. If you don't set a pulse, i.e. set it to `0`, each loop time will be uploaded immediately.
39
39
40
40
**You probably should set a pulse, because CloudWatch only allows 150 uploads per second!** For more info on that topic, read below.
41
41
42
+
**silent** (optional): As per default, the timer writes its results also to the default output. If you want to override this behavior, you can set it to `silent` using any truthy value, e.g. `true` or `'silent'`, latter being a bit more explicit.
43
+
42
44
```
43
45
var name = 'name-of-the-timer'; // this will be your metric's name
44
46
var pulse = 5; // this means data will be pushed to CloudWatch every five seconds
45
47
46
-
var timer = Timer.getTimer(name, pulse);
48
+
var timer = Timer.getTimer(name, pulse); // this will write results to the console
49
+
var silentTimer = Timer.getTimer('i-am-silent', 0, 'silent'); // this one will not
0 commit comments