@@ -193,7 +193,7 @@ public AddApplicationHomeSubClusterResponse addApplicationHomeSubCluster(
193193 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
194194 }
195195 long end = clock .getTime ();
196- opDurations .addAppHomeSubClusterDuration (end , start );
196+ opDurations .addAppHomeSubClusterDuration (start , end );
197197 return AddApplicationHomeSubClusterResponse
198198 .newInstance (homeSubCluster );
199199 }
@@ -218,7 +218,7 @@ public AddApplicationHomeSubClusterResponse addApplicationHomeSubCluster(
218218 putApp (appId , newSubClusterId , true );
219219
220220 long end = clock .getTime ();
221- opDurations .addUpdateAppHomeSubClusterDuration (end , start );
221+ opDurations .addUpdateAppHomeSubClusterDuration (start , end );
222222 return UpdateApplicationHomeSubClusterResponse .newInstance ();
223223 }
224224
@@ -235,7 +235,7 @@ public GetApplicationHomeSubClusterResponse getApplicationHomeSubCluster(
235235 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
236236 }
237237 long end = clock .getTime ();
238- opDurations .addGetAppHomeSubClusterDuration (end , start );
238+ opDurations .addGetAppHomeSubClusterDuration (start , end );
239239 return GetApplicationHomeSubClusterResponse .newInstance (appId , homeSubCluster );
240240 }
241241
@@ -258,7 +258,7 @@ public GetApplicationsHomeSubClusterResponse getApplicationsHomeSubCluster(
258258 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
259259 }
260260 long end = clock .getTime ();
261- opDurations .addGetAppsHomeSubClusterDuration (end , start );
261+ opDurations .addGetAppsHomeSubClusterDuration (start , end );
262262 return GetApplicationsHomeSubClusterResponse .newInstance (result );
263263 }
264264
@@ -291,7 +291,7 @@ public GetApplicationsHomeSubClusterResponse getApplicationsHomeSubCluster(
291291 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
292292 }
293293 long end = clock .getTime ();
294- opDurations .addDeleteAppHomeSubClusterDuration (end , start );
294+ opDurations .addDeleteAppHomeSubClusterDuration (start , end );
295295 return DeleteApplicationHomeSubClusterResponse .newInstance ();
296296 }
297297
@@ -314,7 +314,7 @@ public SubClusterRegisterResponse registerSubCluster(
314314 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
315315 }
316316 long end = clock .getTime ();
317- opDurations .addRegisterSubClusterDuration (end , start );
317+ opDurations .addRegisterSubClusterDuration (start , end );
318318 return SubClusterRegisterResponse .newInstance ();
319319 }
320320
@@ -336,7 +336,7 @@ public SubClusterDeregisterResponse deregisterSubCluster(
336336 putSubclusterInfo (subClusterId , subClusterInfo , true );
337337 }
338338 long end = clock .getTime ();
339- opDurations .addDeregisterSubClusterDuration (end , start );
339+ opDurations .addDeregisterSubClusterDuration (start , end );
340340 return SubClusterDeregisterResponse .newInstance ();
341341 }
342342
@@ -361,7 +361,7 @@ public SubClusterHeartbeatResponse subClusterHeartbeat(
361361
362362 putSubclusterInfo (subClusterId , subClusterInfo , true );
363363 long end = clock .getTime ();
364- opDurations .addSubClusterHeartbeatDuration (clock . getTime (), start );
364+ opDurations .addSubClusterHeartbeatDuration (start , end );
365365 return SubClusterHeartbeatResponse .newInstance ();
366366 }
367367
@@ -383,7 +383,7 @@ public GetSubClusterInfoResponse getSubCluster(
383383 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
384384 }
385385 long end = clock .getTime ();
386- opDurations .addGetSubClusterDuration (end , start );
386+ opDurations .addGetSubClusterDuration (start , end );
387387 return GetSubClusterInfoResponse .newInstance (subClusterInfo );
388388 }
389389
@@ -407,7 +407,7 @@ public GetSubClustersInfoResponse getSubClusters(
407407 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
408408 }
409409 long end = clock .getTime ();
410- opDurations .addGetSubClustersDuration (end , start );
410+ opDurations .addGetSubClustersDuration (start , end );
411411 return GetSubClustersInfoResponse .newInstance (result );
412412 }
413413
@@ -431,7 +431,7 @@ public GetSubClusterPolicyConfigurationResponse getPolicyConfiguration(
431431 return null ;
432432 }
433433 long end = clock .getTime ();
434- opDurations .addGetPolicyConfigurationDuration (end , start );
434+ opDurations .addGetPolicyConfigurationDuration (start , end );
435435 return GetSubClusterPolicyConfigurationResponse
436436 .newInstance (policy );
437437 }
@@ -451,7 +451,7 @@ public SetSubClusterPolicyConfigurationResponse setPolicyConfiguration(
451451 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
452452 }
453453 long end = clock .getTime ();
454- opDurations .addSetPolicyConfigurationDuration (end , start );
454+ opDurations .addSetPolicyConfigurationDuration (start , end );
455455 return SetSubClusterPolicyConfigurationResponse .newInstance ();
456456 }
457457
@@ -475,7 +475,7 @@ public GetSubClusterPoliciesConfigurationsResponse getPoliciesConfigurations(
475475 FederationStateStoreUtils .logAndThrowStoreException (LOG , errMsg );
476476 }
477477 long end = clock .getTime ();
478- opDurations .addGetPoliciesConfigurationsDuration (end , start );
478+ opDurations .addGetPoliciesConfigurationsDuration (start , end );
479479 return GetSubClusterPoliciesConfigurationsResponse .newInstance (result );
480480 }
481481
0 commit comments