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


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java:
##########
@@ -273,13 +275,20 @@ public void kill() {
     public void downloadResource(String execLocalPath, Logger logger, 
List<Pair<String, String>> fileDownloads) {
         for (Pair<String, String> fileDownload : fileDownloads) {
             try {
+                WorkerServerMetrics.incWorkerResourceDownloadCount();
                 // query the tenant code of the resource according to the name 
of the resource
                 String fullName = fileDownload.getLeft();
                 String tenantCode = fileDownload.getRight();
                 String resHdfsPath = 
storageOperate.getResourceFileName(tenantCode, fullName);
                 logger.info("get resource file from hdfs :{}", resHdfsPath);
+                Long resourceDownloadStartTime = System.currentTimeMillis();

Review Comment:
   Fixed by the latest commit.



##########
dolphinscheduler-meter/src/main/resources/grafana/DolphinSchedulerWorker.json:
##########
@@ -172,7 +172,7 @@
         "showThresholdLabels": false,
         "showThresholdMarkers": false
       },
-      "pluginVersion": "8.5.3",
+      "pluginVersion": "9.0.0-beta2",

Review Comment:
   Fixed by the latest commit.



##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/metrics/WorkerServerMetrics.java:
##########
@@ -37,6 +36,36 @@ public class WorkerServerMetrics {
             .description("full worker submit queues count")
             .register(Metrics.globalRegistry);
 
+    private static final Counter WORKER_RESOURCE_DOWNLOAD_COUNTER =
+            Counter.builder("ds.worker.resource.download.count")
+                    .description("worker resource download count")
+                    .register(Metrics.globalRegistry);
+
+    private static final Counter WORKER_RESOURCE_DOWNLOAD_SUCCESS_COUNTER =
+            Counter.builder("ds.worker.resource.download.success.count")
+                    .description("worker resource download success count")
+                    .register(Metrics.globalRegistry);
+
+    private static final Counter WORKER_RESOURCE_DOWNLOAD_FAILURE_COUNTER =
+            Counter.builder("ds.worker.resource.download.failure.count")
+                    .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);
+

Review Comment:
   Fixed by the latest commit.



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