kezhenxu94 commented on code in PR #10749:
URL: https://github.com/apache/dolphinscheduler/pull/10749#discussion_r917595608


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/metrics/WorkerServerMetrics.java:
##########
@@ -37,6 +40,33 @@ public class WorkerServerMetrics {
             .description("full worker submit queues count")
             .register(Metrics.globalRegistry);
 
+    private static final Counter WORKER_RESOURCE_DOWNLOAD_SUCCESS_COUNTER =
+            Counter.builder("ds.worker.resource.download.count")
+                    .tag("status", "success")
+                    .description("worker resource download success count")
+                    .register(Metrics.globalRegistry);
+
+    private static final Counter WORKER_RESOURCE_DOWNLOAD_FAILURE_COUNTER =
+            Counter.builder("ds.worker.resource.download.count")
+                    .tag("status", "fail")
+                    .description("worker resource download failure count")
+                    .register(Metrics.globalRegistry);
+
+    private static final Timer WORKER_RESOURCE_DOWNLOAD_DURATION_TIMER =
+            Timer.builder("ds.worker.resource.download.duration")
+                    .publishPercentiles(0.5, 0.75, 0.95, 0.99)
+                    .publishPercentileHistogram()
+                    .description("time cost of resource download on workers")
+                    .register(Metrics.globalRegistry);
+
+    private static final DistributionSummary 
WORKER_RESOURCE_DOWNLOAD_SIZE_DISTRIBUTION =
+            DistributionSummary.builder("ds.worker.resource.download.size")
+            .baseUnit("KB")

Review Comment:
   I'd just use `bytes` as the unit so users can get more detailed size, and 
they can just convert it to `kb`/`mb` if they want, in Grafana.
   
   Consider if users have many small files, `<1KB`, this would only display `0`.



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