| 59 | // Event-loop-relevant stall floor: encodes/decodes above this are rare but block Node. |
| 60 | const SCHEMA_SLOW_MS = 100 |
| 61 | const schemaDecodeDuration = Metric.histogram("app.schema.decode.duration", { boundaries: schemaDurationBoundaries }) |
| 62 | const schemaEncodeDuration = Metric.histogram("app.schema.encode.duration", { boundaries: schemaDurationBoundaries }) |
| 63 | const schemaItemCount = Metric.histogram("app.schema.item_count", { |
| 64 | boundaries: [0, 1, 2, 5, 10, 25, 50, 100, 250, 500, 1_000, 5_000] |
| 65 | }) |
| 66 | const schemaSlow = Metric.counter("app.schema.slow", { |
| 67 | description: `Repository schema encode/decode slower than ${SCHEMA_SLOW_MS}ms`, |
| 68 | incremental: true |
| 69 | }) |
| 70 | |