From 93ec4d71690df12f49ea055a3e08a9f016443dc7 Mon Sep 17 00:00:00 2001 From: HiroyasuNishiyama Date: Sun, 9 Feb 2020 11:24:58 +0900 Subject: [PATCH 1/3] add metrics usage scenario --- README.md | 1 + designs/metrics-usage.md | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 designs/metrics-usage.md 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-usage.md b/designs/metrics-usage.md new file mode 100644 index 0000000..48dd0db --- /dev/null +++ b/designs/metrics-usage.md @@ -0,0 +1,45 @@ +--- +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 + +## 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 | Mrtrics Usage | Desc. | +| ---- | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| 1 | Capture Elapsed Time | `send`, `receive` | **=*