diff --git a/README.md b/README.md index 5de9ba1..afe9b84 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ with enough detail to review the intent and direction of the feature. - [Dynamic MQTT Node](designs/dynamic-mqtt-node.md) - [Exportable Subflow](designs/exportable-subflow/README.md) - [Node Timeout API](designs/timeout-api.md) + - [Metrics Usage](designs/metrics-usage.md) #### In-progress diff --git a/designs/metrics-sample-flow.png b/designs/metrics-sample-flow.png new file mode 100644 index 0000000..29f3225 Binary files /dev/null and b/designs/metrics-sample-flow.png differ diff --git a/designs/metrics-usage.md b/designs/metrics-usage.md new file mode 100644 index 0000000..c398b0d --- /dev/null +++ b/designs/metrics-usage.md @@ -0,0 +1,99 @@ +--- +state: draft +--- + +# metrics usage + +## Summary + +Metrics logs are useful for gathering and estimating execution statistics of Node-RED. This design note summarizes metrics usage scenarios and expected enhancements on them. + + +## Authors + + - @HiroyasuNishiyama + - @k-toumura + +## Details + +### Supported Metrics Logs + +Currently, Node-RED runtime and its core nodes support following metrics logs. + +| | Runtim/Node | Name | +| ---- | ------------------- | ------------------------------------------------------ | +| 1 | Runtime (all nodes) | `send`, `receive` | +| 2 | `Function` node | `duration` | +| 3 | `Httprequest` node | `duration.millis`, `size.bytes` | +| 4 | `Http in` node | `response.time.millis`, `response.content-length.size` | + +### Usage Scenarios and Enhancements + +Following table lists possible usage scenarios and enhancements of metrics logs: + +| | Purpose | Used Metrics | Metrics Usage | Desc. | +| ---- | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| 1 | Capture Elapsed Time | `send`, `receive` | **=*