@Override public void afterCompile(QueryLifeTimeHookContext ctx, boolean hasError) { if (metrics != null && compilingQryScp != null) { metrics.endScope(compilingQryScp); } }
@Override public void afterExecution(QueryLifeTimeHookContext ctx, boolean hasError) { if (metrics != null && executingQryScp != null) { metrics.endScope(executingQryScp); } } }
@Override public void afterCompile(QueryLifeTimeHookContext ctx, boolean hasError) { if (metrics != null && compilingQryScp != null) { metrics.endScope(compilingQryScp); } }
@Override public void afterExecution(QueryLifeTimeHookContext ctx, boolean hasError) { if (metrics != null && executingQryScp != null) { metrics.endScope(executingQryScp); } } }
private void endMetrics(String method) { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { MetricsScope scope = openScopes.remove(method); if (scope != null) { metrics.endScope(scope); } } }
/** * Cleans up any dangling perfLog metric call scopes. */ public void cleanupPerfLogMetrics() { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { for (MetricsScope openScope : openScopes.values()) { metrics.endScope(openScope); } } openScopes.clear(); } }
protected final MetricsScope updateOperationStateMetrics(MetricsScope stateScope, String operationPrefix, String completedOperationPrefix, OperationState state) { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { if (stateScope != null) { metrics.endScope(stateScope); stateScope = null; } if (scopeStates.contains(state)) { stateScope = metrics.createScope(MetricsConstant.API_PREFIX + operationPrefix + state); } if (terminalStates.contains(state)) { metrics.incrementCounter(completedOperationPrefix + state); } } return stateScope; }
metrics.endScope(submittedQryScp);
private void endMetrics(String method) { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { MetricsScope scope = openScopes.remove(method); if (scope != null) { metrics.endScope(scope); } } }
/** * Cleans up any dangling perfLog metric call scopes. */ public void cleanupPerfLogMetrics() { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { for (MetricsScope openScope : openScopes.values()) { metrics.endScope(openScope); } } openScopes.clear(); } }
protected final MetricsScope updateOperationStateMetrics(MetricsScope stateScope, String operationPrefix, String completedOperationPrefix, OperationState state) { Metrics metrics = MetricsFactory.getInstance(); if (metrics != null) { if (stateScope != null) { metrics.endScope(stateScope); stateScope = null; } if (scopeStates.contains(state)) { stateScope = metrics.createScope(MetricsConstant.API_PREFIX + operationPrefix + state); } if (terminalStates.contains(state)) { metrics.incrementCounter(completedOperationPrefix + state); } } return stateScope; }
metrics.endScope(submittedQryScp);