chaoyli edited a comment on issue #3517:
URL: 
https://github.com/apache/incubator-doris/issues/3517#issuecomment-625588846


   The metric is like this
   ```
   [
      {
         "tags":{
            "table_id":10010,
            "metric":"scanner_rows"
         },
         "value":1000,
         "unit":"number"
      },
      {
         "tags":{
            "table_id":10010,
            "metric":"scanner_bytes"
         },
         "value":1024,
         "unit":"bytes"
      }
   ]
   ```
   Supposing there are 10000 tablets in one BE node and collecting metrics at 
every 15 seconds.
   Every time we will gather 10000 * 200 Bytes = 2MB, one hundred nodes will 
collect 200MB, this will be consume huge bandwidth. And also user will take 
care of table granularity than tablet. So we will collect table metrics instead 
of tablet metrics.
   For metric in one BE node, I will use a map to store the information.
   ```
   std::unordered_map<table_id, metric> table_metrics
   ```
   The incremental metric value should be calculated at every collecting 
interval.
   Like this
   ```
   2020-05-08 14:00:00  10000  1024(scanner_rows)
   2020-05-08 14:00:15   10000  2048(scanner_rows)
   The incremental value at this cycle is 1024.
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to