mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Add startTimer to Gauge
Add startTimer interface to Gauge similar to how the startTimer interface for Histogram works.
This commit is contained in:
1 parent
49b5b4412f
commit
69221a310c
2 files changed
+37
No files matched your search
@@ -198,6 +198,16 @@ describe("lib/prometheus", function() {
|
||||
);
|
||||
});
|
||||
});
|
||||
describe(".startTimer()", function() {
|
||||
it("should set the gauge to a short duration", function() {
|
||||
let setDuration = gauge.startTimer();
|
||||
setDuration();
|
||||
assert(
|
||||
gauge._values.get("") > 0 && gauge._values.get("") < 1,
|
||||
"value set is not between 0 and 1"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("class Histogram", function() {
|
||||
|
||||
Reference in new issue
Block a user