wForget commented on code in PR #6038:
URL: https://github.com/apache/kyuubi/pull/6038#discussion_r1477894906


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala:
##########
@@ -210,8 +210,11 @@ abstract class KyuubiOperation(session: Session) extends 
AbstractOperation(sessi
 
   override def setState(newState: OperationState): Unit = {
     MetricsSystem.tracing { ms =>
-      if (!OperationState.isTerminal(state)) {
+      if (!isTerminalState(state)) {
         ms.markMeter(MetricRegistry.name(OPERATION_STATE, opType, 
state.toString.toLowerCase), -1)
+      } else {
+        val execTime = System.currentTimeMillis() - startTime

Review Comment:
   Then this will introduce another discussion. Since there are 
`kyuubi.backend_service.xxx` metircs, do we still need to add `exec_time` 
metric for each operation?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to