You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/03/31 09:25:15 UTC

[GitHub] [ignite] Vladsz83 commented on a change in pull request #7446: IGNITE-12464 : Service metrics

Vladsz83 commented on a change in pull request #7446: IGNITE-12464 : Service metrics
URL: https://github.com/apache/ignite/pull/7446#discussion_r400767371
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java
 ##########
 @@ -354,6 +355,37 @@ T proxy() {
         return proxy;
     }
 
+    /**
+     * Calls service method, measures and registers its performance.
+     *
+     * @param srvcProc Current service processor.
+     * @param srvc The service object.
+     * @param srvcName The service name.
+     * @param mtd Method to call.
+     * @param args Arguments for {@code mtd}.
+     */
+    private static Object callSrvcMtd(ServiceProcessorAdapter srvcProc, Service srvc, String srvcName, Method mtd,
+        Object[] args) throws InvocationTargetException, IllegalAccessException {
+
+        long timing = System.nanoTime();
+
+        try {
+            return mtd.invoke(srvc, args);
+        }
+        finally {
+            if (srvcProc instanceof IgniteServiceProcessor) {
+                timing = System.nanoTime() - timing;
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services