Copilot commented on code in PR #17388:
URL: https://github.com/apache/iotdb/pull/17388#discussion_r3005928990


##########
iotdb-core/metrics/ReadMe.md:
##########
@@ -57,76 +52,43 @@ Metric Module
    3. Provide the ability to load metric sets.
    4. Provide the access of metricManager and CompositeReporter.
 
-# 2. Test Report
-We implemented the monitoring framework mainly based on Micrometer, and tested 
the results as follows:
+# 2. How to use?
 
-## 2.1. Test Environment
-1. Processor:Inter(R) Core(TM) i7-1065G7 CPU
-2. RAM: 32G
+## 2.1. Configuration
+Configure the metrics module through `iotdb-system.properties`. The main 
options supported by the current code are listed below.
 
-## 2.2. Test Metrics
-1. We use a single thread to create counter and run the test cases. The test 
metrics as follows:
-   1. memory : Memory usage in MB.
-   2. create : The time required to create, in ms.
-   3. searchInorder : The time required for the sequential query, in ms.
-   4. searchDisorder : The time required for random queries in ms.
+| properties | meaning | example |
+| --- | --- | --- |
+| `dn(cn)_metric_reporter_list` | Reporter list. The current implementation 
supports `JMX`, `PROMETHEUS` and `IOTDB`. | `JMX,PROMETHEUS` |
+| `dn(cn)_metric_level` | Initial metric level. | `OFF`, `CORE`, `IMPORTANT`, 
`NORMAL`, `ALL` |
+| `cn_metric_prometheus_reporter_port` | Prometheus HTTP port for ConfigNode. 
| `9091` |
+| `dn_metric_prometheus_reporter_port` | Prometheus HTTP port for DataNode. | 
`9092` |
 
-## 2.3. Test parameters
-1. metric : test metric 
-2. name : The name of the test metric, unify to one length.
-3. tag : The tag of the test metric, unify to one length.
-4. metricNumberTotal:The number of metrics tested.
-5. tagSingleNumber:Number of tags of the test metric.
-6. tagTotalNumber:The number of tag pools, the default is 1000, all
-7. tags are taken out of the tag pool.
-8. searchNumber:The number of queries, the default is 1000000.
-9. loop:The number of query loops, the default is 10.
+More details, see the User Guide and the `iotdb-system.properties.template` 
file.
 
-## 2.4. Test Result
-![](https://cwiki.apache.org/confluence/download/attachments/184617400/image2021-7-14_16-32-55.png?version=1&modificationDate=1626403814000&api=v2)
-
-# 3. How to use?
-
-## 3.1. Configuration
-1. firstly, you need to set up some system property, for example:
-
-```
-System.setProperty("line.separator", "\n");
-System.setProperty("IOTDB_CONF", "metrics/core/src/test/resources");
-```
-
-2. Then, you can modify 
`iotdb-datanode.properties(iotdb-confignode.properties)` as you like, some 
details:
-
-| properties                             | meaning                             
                                                   | example                    
         |
-|----------------------------------------| 
--------------------------------------------------------------------------------------
 | ----------------------------------- |
-| dn(cn)_enable_metric                   | whether enable the module           
                                                   | true                       
         |
-| dn(cn)_enable_performance_stat         | Is stat performance of operation 
latency                                               | true                    
            |
-| dn(cn)_metric_reporter_list            | the list of reporter                
                                                   | JMX, PROMETHEUS, IOTDB     
         |
-| dn(cn)_metric_level                    | the init level of metrics           
                                                   | ALL, NORMAL, IMPORTANT, 
CORE        |
-| dn(cn)_metric_async_collect_period     | The period of the collection of 
some metrics in asynchronous way, such as tsfile size. | 5                      
             |
-
-3. More details, see User Doc.
-
-## 3.2. Use Guide in IoTDB Server Module
-1. Now, MetricService is registered as IService in server and confignode 
module, you can simple set properties: `dn(cn)_enable_metric=true` to use 
metric service.
-2. In server module you can easily use these metric by 
`MetricService.getInstance()`, for example:
+## 2.2. Use Guide in IoTDB Server Module
+1. `MetricService` is registered as an `IService` in both DataNode and 
ConfigNode modules. Enable it with `dn(cn)_enable_metric=true`.

Review Comment:
   `dn(cn)_enable_metric` is documented as the switch to enable MetricService, 
but the server starts and registers MetricService unconditionally (e.g., 
DataNode/ConfigNode `setUpMetricService()`), and there’s no corresponding 
config key in `MetricConfigDescriptor`/`iotdb-system.properties.template`. 
Please update this section to reflect the real way to disable metrics (e.g., 
set `dn/cn_metric_level=OFF` and/or leave `*_metric_reporter_list` empty) or 
document the actual controlling config if it exists elsewhere.
   ```suggestion
   1. `MetricService` is registered as an `IService` in both DataNode and 
ConfigNode modules and is started unconditionally. To effectively disable 
metrics output, set `dn(cn)_metric_level=OFF` and/or leave 
`dn(cn)_metric_reporter_list` empty.
   ```



##########
iotdb-core/metrics/ReadMe.md:
##########
@@ -57,76 +52,43 @@ Metric Module
    3. Provide the ability to load metric sets.
    4. Provide the access of metricManager and CompositeReporter.
 
-# 2. Test Report
-We implemented the monitoring framework mainly based on Micrometer, and tested 
the results as follows:
+# 2. How to use?
 
-## 2.1. Test Environment
-1. Processor:Inter(R) Core(TM) i7-1065G7 CPU
-2. RAM: 32G
+## 2.1. Configuration
+Configure the metrics module through `iotdb-system.properties`. The main 
options supported by the current code are listed below.
 
-## 2.2. Test Metrics
-1. We use a single thread to create counter and run the test cases. The test 
metrics as follows:
-   1. memory : Memory usage in MB.
-   2. create : The time required to create, in ms.
-   3. searchInorder : The time required for the sequential query, in ms.
-   4. searchDisorder : The time required for random queries in ms.
+| properties | meaning | example |
+| --- | --- | --- |
+| `dn(cn)_metric_reporter_list` | Reporter list. The current implementation 
supports `JMX`, `PROMETHEUS` and `IOTDB`. | `JMX,PROMETHEUS` |
+| `dn(cn)_metric_level` | Initial metric level. | `OFF`, `CORE`, `IMPORTANT`, 
`NORMAL`, `ALL` |
+| `cn_metric_prometheus_reporter_port` | Prometheus HTTP port for ConfigNode. 
| `9091` |
+| `dn_metric_prometheus_reporter_port` | Prometheus HTTP port for DataNode. | 
`9092` |
 
-## 2.3. Test parameters
-1. metric : test metric 
-2. name : The name of the test metric, unify to one length.
-3. tag : The tag of the test metric, unify to one length.
-4. metricNumberTotal:The number of metrics tested.
-5. tagSingleNumber:Number of tags of the test metric.
-6. tagTotalNumber:The number of tag pools, the default is 1000, all
-7. tags are taken out of the tag pool.
-8. searchNumber:The number of queries, the default is 1000000.
-9. loop:The number of query loops, the default is 10.
+More details, see the User Guide and the `iotdb-system.properties.template` 
file.

Review Comment:
   This README says the reporter list supports `IOTDB` and then points readers 
to `iotdb-system.properties.template` for more details, but the current 
template only documents `[JMX, PROMETHEUS]` and doesn’t list the IoTDB reporter 
config keys. Either adjust the wording here (so it’s clear the template is 
incomplete/outdated) or update the template in a follow-up to avoid confusing 
users.
   ```suggestion
   For more details, see the User Guide. Note that the 
`iotdb-system.properties.template` file currently documents configuration for 
JMX and Prometheus reporters; IoTDB reporter configuration keys may not yet be 
listed there.
   ```



##########
iotdb-core/metrics/ReadMe.md:
##########
@@ -57,76 +52,43 @@ Metric Module
    3. Provide the ability to load metric sets.
    4. Provide the access of metricManager and CompositeReporter.
 
-# 2. Test Report
-We implemented the monitoring framework mainly based on Micrometer, and tested 
the results as follows:
+# 2. How to use?
 
-## 2.1. Test Environment
-1. Processor:Inter(R) Core(TM) i7-1065G7 CPU
-2. RAM: 32G
+## 2.1. Configuration
+Configure the metrics module through `iotdb-system.properties`. The main 
options supported by the current code are listed below.
 
-## 2.2. Test Metrics
-1. We use a single thread to create counter and run the test cases. The test 
metrics as follows:
-   1. memory : Memory usage in MB.
-   2. create : The time required to create, in ms.
-   3. searchInorder : The time required for the sequential query, in ms.
-   4. searchDisorder : The time required for random queries in ms.
+| properties | meaning | example |
+| --- | --- | --- |
+| `dn(cn)_metric_reporter_list` | Reporter list. The current implementation 
supports `JMX`, `PROMETHEUS` and `IOTDB`. | `JMX,PROMETHEUS` |
+| `dn(cn)_metric_level` | Initial metric level. | `OFF`, `CORE`, `IMPORTANT`, 
`NORMAL`, `ALL` |

Review Comment:
   In the configuration table, the `example` column for `dn(cn)_metric_level` 
lists all possible values rather than an example value. Consider moving the 
allowed values into the `meaning` column (or an `Options:` note) and using a 
single representative example (e.g., `IMPORTANT`).
   ```suggestion
   | `dn(cn)_metric_level` | Initial metric level. Options: `OFF`, `CORE`, 
`IMPORTANT`, `NORMAL`, `ALL`. | `IMPORTANT` |
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to