Skip to content

Commit 0cf65ce

Browse files
committed
lib: silence, linter...
1 parent 00f2906 commit 0cf65ce

File tree

5 files changed

+96
-154
lines changed

5 files changed

+96
-154
lines changed

doc/api/metrics.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ errorCount.increment(5); // Increment by 5
9494
errorCount.decrement(2); // Decrement by 2
9595
```
9696

97-
9897
### `metrics.createGauge(name[, meta])`
9998

10099
<!-- YAML
@@ -117,7 +116,6 @@ const memory = createGauge('memory.usage.bytes');
117116
memory.reset(memoryUsage().heapUsed);
118117
```
119118

120-
121119
### `metrics.createPullGauge(name, fn[, meta])`
122120

123121
<!-- YAML
@@ -254,7 +252,7 @@ added: REPLACEME
254252

255253
* {string}
256254

257-
The name of the diagnostics_channel used for this metric.
255+
The name of the diagnostics\_channel used for this metric.
258256

259257
#### `metric.channel`
260258

@@ -485,7 +483,8 @@ added: REPLACEME
485483

486484
* {number|undefined}
487485

488-
The end time of the timer (milliseconds since `performance.timeOrigin`). `undefined` if timer is still running. This property is read-only.
486+
The end time of the timer (milliseconds since `performance.timeOrigin`). `undefined` if timer is still running.
487+
This property is read-only.
489488

490489
#### `timer.duration`
491490

@@ -543,7 +542,6 @@ const dbQueryDuration = createCounter('db.query.duration');
543542
}
544543
```
545544

546-
547545
### Class: `PullGauge`
548546

549547
* Extends: {metrics.Metric}
@@ -582,7 +580,6 @@ console.log(`Current CPU usage: ${value}`);
582580
cpu.sample({ threshold: 'high' });
583581
```
584582

585-
586583
## Integration with Diagnostics Channel
587584

588585
All metrics publish their reports through `node:diagnostics_channel`. The channel
@@ -633,6 +630,6 @@ subscribe('metrics:new', (metric) => {
633630
2. **Metadata**: Use metadata to add dimensions to your metrics without creating separate metric instances.
634631

635632
3. **Performance**: Metric types are designed to be lightweight. However, avoid
636-
creating metric types in hot code paths. As with diagnostics_channel, metric
637-
creation is optimized for capture time performance by moving costly
638-
operations to metric type creation time.
633+
creating metric types in hot code paths. As with diagnostics\_channel, metric
634+
creation is optimized for capture time performance by moving costly
635+
operations to metric type creation time.

0 commit comments

Comments
 (0)