phet commented on code in PR #3656:
URL: https://github.com/apache/gobblin/pull/3656#discussion_r1130303841


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -312,15 +380,21 @@ private void scheduleSpecsFromCatalog() {
         try {
           individualGetSpecStartTime = System.nanoTime();
           Spec spec = this.flowCatalog.get().getSpecWrapper(uri);
-          this.individualGetSpecSpeedNanosValue = System.nanoTime() - 
individualGetSpecStartTime;
+          this.individualGetSpecSpeedValue = System.nanoTime() - 
individualGetSpecStartTime;
+          totalGetTime += this.individualGetSpecSpeedValue;
           addSpecHelperMethod(spec);
+          totalAddSpecTime += this.eachCompleteAddSpecValue; // this is 
updated by each call to onAddSpec
+          actualNumFlowsScheduled += 1;
         } catch (Exception e) {
           // If there is an uncaught error thrown during compilation, log it 
and continue adding flows
           _log.error("Could not schedule spec uri {} from flowCatalog due to 
", uri, e);
         }
-
     }
+    this.individualGetSpecSpeedValue = -1L;
 
+    this.totalGetSpecTimeValue = totalGetTime;
+    this.totalAddSpecTimeValue = totalAddSpecTime;

Review Comment:
   I see your point on the logging, but what I like about emitting as a metric:
   a. the value is preserved for just as long as other metrics are (logs 
generally retained shorter)
   b. easy to align timeseries for this metric along w/ the other related ones
   c. this value can be found in the same place as the other metrics we're 
looking at (no need to pause on reading the other metrics to go fetch this 
value from the logs)



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