Add time unit suffixes to variables (#561)

Add suffixes like Ms and Ns to variables whos time unit is not in
seconds.  This is aligning with a new code style of putting units
on variables that are not in SI base units.
This commit is contained in:
Hornwitser authored and GitHub committed 2024-01-20 13:26:55 +01:00
1 parent 9842705eb9
commit c53781d16c
38 files changed
+221 -201

No files matched your search

+9 -9
View File
@@ -740,10 +740,10 @@ class GaugeChild extends ValueCollectorChild {
* seconds from when the timer was started
*/
startTimer() {
let start = process.hrtime.bigint();
let startNs = process.hrtime.bigint();
return () => {
let end = process.hrtime.bigint();
this.set(Number(end - start) / 1e9);
let endNs = process.hrtime.bigint();
this.set(Number(endNs - startNs) / 1e9);
};
}
}
@@ -979,10 +979,10 @@ class SummaryChild {
* when the timer was started into the metric.
*/
startTimer() {
let start = process.hrtime.bigint();
let startNs = process.hrtime.bigint();
return () => {
let end = process.hrtime.bigint();
this.observe(Number(end - start) / 1e9);
let endNs = process.hrtime.bigint();
this.observe(Number(endNs - startNs) / 1e9);
};
}
}
@@ -1260,10 +1260,10 @@ class HistogramChild {
* when the timer was started into the metric.
*/
startTimer() {
let start = process.hrtime.bigint();
let startNs = process.hrtime.bigint();
return () => {
let end = process.hrtime.bigint();
this.observe(Number(end - start) / 1e9);
let endNs = process.hrtime.bigint();
this.observe(Number(endNs - startNs) / 1e9);
};
}
}