Skip to content

Commit 75895af

Browse files
dhrubo-oszane-neo
authored andcommitted
renaming metrics (opensearch-project#1224)
* renaming metrics Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * updating tests Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * updating test cases Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * removing the ML_NODE checking for node level stats Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * updating constructing new set Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * spotless Apply Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * updating ML_NODE_TOTAL_MODEL_COUNT to ML_DEPLOYED_MODEL_COUNT Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * fixing metrics count Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * spotless Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * fixing executing task Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * updating comment Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> --------- Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
1 parent d87739f commit 75895af

34 files changed

+903
-160
lines changed

plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java

-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import org.opensearch.ml.helper.ModelAccessControlHelper;
5555
import org.opensearch.ml.model.MLModelManager;
5656
import org.opensearch.ml.settings.MLFeatureEnabledSetting;
57-
import org.opensearch.ml.stats.MLNodeLevelStat;
5857
import org.opensearch.ml.stats.MLStats;
5958
import org.opensearch.ml.task.MLTaskDispatcher;
6059
import org.opensearch.ml.task.MLTaskManager;
@@ -148,8 +147,6 @@ protected void doExecute(Task task, ActionRequest request, ActionListener<MLDepl
148147
if (!allowCustomDeploymentPlan && !deployToAllNodes) {
149148
throw new IllegalArgumentException("Don't allow custom deployment plan");
150149
}
151-
// mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
152-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
153150
DiscoveryNode[] allEligibleNodes = nodeFilter.getEligibleNodes(functionName);
154151
Map<String, DiscoveryNode> nodeMapping = new HashMap<>();
155152
for (DiscoveryNode node : allEligibleNodes) {

plugin/src/main/java/org/opensearch/ml/action/register/TransportRegisterModelAction.java

-7
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import org.opensearch.ml.indices.MLIndicesHandler;
5555
import org.opensearch.ml.model.MLModelGroupManager;
5656
import org.opensearch.ml.model.MLModelManager;
57-
import org.opensearch.ml.stats.MLNodeLevelStat;
5857
import org.opensearch.ml.stats.MLStats;
5958
import org.opensearch.ml.task.MLTaskDispatcher;
6059
import org.opensearch.ml.task.MLTaskManager;
@@ -234,12 +233,6 @@ private void registerModel(MLRegisterModelInput registerModelInput, ActionListen
234233
throw new IllegalArgumentException("URL can't match trusted url regex");
235234
}
236235
}
237-
// mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
238-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
239-
// //TODO: track executing task; track register failures
240-
// mlStats.createCounterStatIfAbsent(FunctionName.TEXT_EMBEDDING,
241-
// ActionName.REGISTER,
242-
// MLActionLevelStat.ML_ACTION_REQUEST_COUNT).increment();
243236
boolean isAsync = registerModelInput.getFunctionName() != FunctionName.REMOTE;
244237
MLTask mlTask = MLTask
245238
.builder()

plugin/src/main/java/org/opensearch/ml/action/stats/MLStatsNodesTransportAction.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ MLStatsNodeResponse createMLStatsNodeResponse(MLStatsNodesRequest mlStatsNodesRe
9797
MLStatsInput mlStatsInput = mlStatsNodesRequest.getMlStatsInput();
9898
// return node level stats
9999
if (mlStatsInput.getTargetStatLevels().contains(MLStatLevel.NODE)) {
100-
if (mlStatsInput.retrieveStat(MLNodeLevelStat.ML_NODE_JVM_HEAP_USAGE)) {
100+
if (mlStatsInput.retrieveStat(MLNodeLevelStat.ML_JVM_HEAP_USAGE)) {
101101
long heapUsedPercent = jvmService.stats().getMem().getHeapUsedPercent();
102-
statValues.put(MLNodeLevelStat.ML_NODE_JVM_HEAP_USAGE, heapUsedPercent);
102+
statValues.put(MLNodeLevelStat.ML_JVM_HEAP_USAGE, heapUsedPercent);
103103
}
104104

105105
for (Enum statName : mlStats.getNodeStats().keySet()) {

plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelAction.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ protected MLUndeployModelNodeResponse nodeOperation(MLUndeployModelNodeRequest r
228228
}
229229

230230
private MLUndeployModelNodeResponse createUndeployModelNodeResponse(MLUndeployModelNodesRequest MLUndeployModelNodesRequest) {
231-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
232-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
231+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).increment();
233232

234233
String[] modelIds = MLUndeployModelNodesRequest.getModelIds();
235234

@@ -246,7 +245,7 @@ private MLUndeployModelNodeResponse createUndeployModelNodeResponse(MLUndeployMo
246245
}
247246

248247
Map<String, String> modelUndeployStatus = mlModelManager.undeployModel(modelIds);
249-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).decrement();
248+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).decrement();
250249
return new MLUndeployModelNodeResponse(clusterService.localNode(), modelUndeployStatus, modelWorkerNodesMap);
251250
}
252251
}

plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java

+16-23
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public MLModelManager(
212212
public void registerModelMeta(MLRegisterModelMetaInput mlRegisterModelMetaInput, ActionListener<String> listener) {
213213
try {
214214
FunctionName functionName = mlRegisterModelMetaInput.getFunctionName();
215-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
215+
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
216216
mlStats.createCounterStatIfAbsent(functionName, REGISTER, ML_ACTION_REQUEST_COUNT).increment();
217217
String modelGroupId = mlRegisterModelMetaInput.getModelGroupId();
218218
if (Strings.isBlank(modelGroupId)) {
@@ -322,9 +322,9 @@ public void registerMLModel(MLRegisterModelInput registerModelInput, MLTask mlTa
322322

323323
checkAndAddRunningTask(mlTask, maxRegisterTasksPerNode);
324324
try {
325-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
326-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
325+
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
327326
mlStats.createCounterStatIfAbsent(mlTask.getFunctionName(), REGISTER, ML_ACTION_REQUEST_COUNT).increment();
327+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).increment();
328328

329329
String modelGroupId = registerModelInput.getModelGroupId();
330330
GetRequest getModelGroupRequest = new GetRequest(ML_MODEL_GROUP_INDEX).id(modelGroupId);
@@ -384,17 +384,14 @@ public void registerMLModel(MLRegisterModelInput registerModelInput, MLTask mlTa
384384
} catch (Exception e) {
385385
handleException(registerModelInput.getFunctionName(), mlTask.getTaskId(), e);
386386
} finally {
387-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
387+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).decrement();
388388
}
389389
}
390390

391391
private void indexRemoteModel(MLRegisterModelInput registerModelInput, MLTask mlTask, String modelVersion) {
392392
String taskId = mlTask.getTaskId();
393393
FunctionName functionName = mlTask.getFunctionName();
394394
try (ThreadContext.StoredContext context = client.threadPool().getThreadContext().stashContext()) {
395-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
396-
mlStats.createCounterStatIfAbsent(functionName, REGISTER, ML_ACTION_REQUEST_COUNT).increment();
397-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
398395

399396
String modelName = registerModelInput.getModelName();
400397
String version = modelVersion == null ? registerModelInput.getVersion() : modelVersion;
@@ -443,8 +440,6 @@ private void indexRemoteModel(MLRegisterModelInput registerModelInput, MLTask ml
443440
} catch (Exception e) {
444441
logException("Failed to upload model", e, log);
445442
handleException(functionName, taskId, e);
446-
} finally {
447-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
448443
}
449444
}
450445

@@ -462,9 +457,6 @@ private void registerModelFromUrl(MLRegisterModelInput registerModelInput, MLTas
462457
String taskId = mlTask.getTaskId();
463458
FunctionName functionName = mlTask.getFunctionName();
464459
try (ThreadContext.StoredContext context = client.threadPool().getThreadContext().stashContext()) {
465-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
466-
mlStats.createCounterStatIfAbsent(functionName, REGISTER, ML_ACTION_REQUEST_COUNT).increment();
467-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
468460
String modelName = registerModelInput.getModelName();
469461
String version = modelVersion == null ? registerModelInput.getVersion() : modelVersion;
470462
String modelGroupId = registerModelInput.getModelGroupId();
@@ -509,8 +501,6 @@ private void registerModelFromUrl(MLRegisterModelInput registerModelInput, MLTas
509501
} catch (Exception e) {
510502
logException("Failed to register model", e, log);
511503
handleException(functionName, taskId, e);
512-
} finally {
513-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
514504
}
515505
}
516506

@@ -693,7 +683,7 @@ private void handleException(FunctionName functionName, String taskId, Exception
693683
&& !(e instanceof MLResourceNotFoundException)
694684
&& !(e instanceof IllegalArgumentException)) {
695685
mlStats.createCounterStatIfAbsent(functionName, REGISTER, MLActionLevelStat.ML_ACTION_FAILURE_COUNT).increment();
696-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_FAILURE_COUNT).increment();
686+
mlStats.getStat(MLNodeLevelStat.ML_FAILURE_COUNT).increment();
697687
}
698688
Map<String, Object> updated = ImmutableMap.of(ERROR_FIELD, MLExceptionUtils.getRootCauseMessage(e), STATE_FIELD, FAILED);
699689
mlTaskManager.updateMLTask(taskId, updated, TIMEOUT_IN_MILLIS, true);
@@ -718,7 +708,8 @@ public void deployModel(
718708
ActionListener<String> listener
719709
) {
720710
mlStats.createCounterStatIfAbsent(functionName, ActionName.DEPLOY, ML_ACTION_REQUEST_COUNT).increment();
721-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
711+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).increment();
712+
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
722713
List<String> workerNodes = mlTask.getWorkerNodes();
723714
if (modelCacheHelper.isModelDeployed(modelId)) {
724715
if (workerNodes != null && workerNodes.size() > 0) {
@@ -800,7 +791,7 @@ public void deployModel(
800791
MLExecutable mlExecutable = mlEngine.deployExecute(mlModel, params);
801792
try {
802793
modelCacheHelper.setMLExecutor(modelId, mlExecutable);
803-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT).increment();
794+
mlStats.getStat(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT).increment();
804795
modelCacheHelper.setModelState(modelId, MLModelState.DEPLOYED);
805796
listener.onResponse("successful");
806797
} catch (Exception e) {
@@ -813,7 +804,7 @@ public void deployModel(
813804
Predictable predictable = mlEngine.deploy(mlModel, params);
814805
try {
815806
modelCacheHelper.setPredictor(modelId, predictable);
816-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT).increment();
807+
mlStats.getStat(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT).increment();
817808
modelCacheHelper.setModelState(modelId, MLModelState.DEPLOYED);
818809
Long modelContentSizeInBytes = mlModel.getModelContentSizeInBytes();
819810
long contentSize = modelContentSizeInBytes == null
@@ -837,6 +828,8 @@ public void deployModel(
837828
})));
838829
} catch (Exception e) {
839830
handleDeployModelException(modelId, functionName, listener, e);
831+
} finally {
832+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).decrement();
840833
}
841834
}
842835

@@ -846,7 +839,7 @@ private void handleDeployModelException(String modelId, FunctionName functionNam
846839
&& !(e instanceof MLResourceNotFoundException)
847840
&& !(e instanceof IllegalArgumentException)) {
848841
mlStats.createCounterStatIfAbsent(functionName, ActionName.DEPLOY, MLActionLevelStat.ML_ACTION_FAILURE_COUNT).increment();
849-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_FAILURE_COUNT).increment();
842+
mlStats.getStat(MLNodeLevelStat.ML_FAILURE_COUNT).increment();
850843
}
851844
removeModel(modelId);
852845
listener.onFailure(e);
@@ -855,7 +848,7 @@ private void handleDeployModelException(String modelId, FunctionName functionNam
855848
private void setupPredictable(String modelId, MLModel mlModel, Map<String, Object> params) {
856849
Predictable predictable = mlEngine.deploy(mlModel, params);
857850
modelCacheHelper.setPredictor(modelId, predictable);
858-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT).increment();
851+
mlStats.getStat(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT).increment();
859852
modelCacheHelper.setModelState(modelId, MLModelState.DEPLOYED);
860853
}
861854

@@ -1056,8 +1049,8 @@ public synchronized Map<String, String> undeployModel(String[] modelIds) {
10561049
for (String modelId : modelIds) {
10571050
if (modelCacheHelper.isModelDeployed(modelId)) {
10581051
modelUndeployStatus.put(modelId, UNDEPLOYED);
1059-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT).decrement();
1060-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
1052+
mlStats.getStat(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT).decrement();
1053+
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
10611054
mlStats
10621055
.createCounterStatIfAbsent(getModelFunctionName(modelId), ActionName.UNDEPLOY, ML_ACTION_REQUEST_COUNT)
10631056
.increment();
@@ -1070,7 +1063,7 @@ public synchronized Map<String, String> undeployModel(String[] modelIds) {
10701063
log.debug("undeploy all models {}", Arrays.toString(getLocalDeployedModels()));
10711064
for (String modelId : getLocalDeployedModels()) {
10721065
modelUndeployStatus.put(modelId, UNDEPLOYED);
1073-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT).decrement();
1066+
mlStats.getStat(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT).decrement();
10741067
mlStats.createCounterStatIfAbsent(getModelFunctionName(modelId), ActionName.UNDEPLOY, ML_ACTION_REQUEST_COUNT).increment();
10751068
removeModel(modelId);
10761069
}

plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ public Collection<Object> createComponents(
304304
stats.put(MLClusterLevelStat.ML_MODEL_COUNT, new MLStat<>(true, new CounterSupplier()));
305305
stats.put(MLClusterLevelStat.ML_CONNECTOR_COUNT, new MLStat<>(true, new CounterSupplier()));
306306
// node level stats
307-
stats.put(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT, new MLStat<>(false, new CounterSupplier()));
308-
stats.put(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT, new MLStat<>(false, new CounterSupplier()));
309-
stats.put(MLNodeLevelStat.ML_NODE_TOTAL_FAILURE_COUNT, new MLStat<>(false, new CounterSupplier()));
310-
stats.put(MLNodeLevelStat.ML_NODE_TOTAL_MODEL_COUNT, new MLStat<>(false, new CounterSupplier()));
311-
stats.put(MLNodeLevelStat.ML_NODE_TOTAL_CIRCUIT_BREAKER_TRIGGER_COUNT, new MLStat<>(false, new CounterSupplier()));
307+
stats.put(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT, new MLStat<>(false, new CounterSupplier()));
308+
stats.put(MLNodeLevelStat.ML_REQUEST_COUNT, new MLStat<>(false, new CounterSupplier()));
309+
stats.put(MLNodeLevelStat.ML_FAILURE_COUNT, new MLStat<>(false, new CounterSupplier()));
310+
stats.put(MLNodeLevelStat.ML_DEPLOYED_MODEL_COUNT, new MLStat<>(false, new CounterSupplier()));
311+
stats.put(MLNodeLevelStat.ML_CIRCUIT_BREAKER_TRIGGER_COUNT, new MLStat<>(false, new CounterSupplier()));
312312
this.mlStats = new MLStats(stats);
313313

314314
mlIndicesHandler = new MLIndicesHandler(clusterService, client);

plugin/src/main/java/org/opensearch/ml/rest/RestMLStatsAction.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.Locale;
2222
import java.util.Map;
2323
import java.util.Optional;
24+
import java.util.Set;
2425
import java.util.stream.Collectors;
2526

2627
import org.opensearch.client.node.NodeClient;
@@ -60,6 +61,12 @@ public class RestMLStatsAction extends BaseRestHandler {
6061
private static final String QUERY_ALL_MODEL_META_DOC =
6162
"{\"query\":{\"bool\":{\"must_not\":{\"exists\":{\"field\":\"chunk_number\"}}}}}";
6263

64+
private static final Set<String> ML_NODE_STAT_NAMES = EnumSet
65+
.allOf(MLNodeLevelStat.class)
66+
.stream()
67+
.map(stat -> stat.name())
68+
.collect(Collectors.toSet());
69+
6370
/**
6471
* Constructor
6572
* @param mlStats MLStats object
@@ -148,6 +155,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
148155
}
149156

150157
MLStatsInput createMlStatsInputFromRequestParams(RestRequest request) {
158+
151159
MLStatsInput mlStatsInput = new MLStatsInput();
152160
Optional<String[]> nodeIds = splitCommaSeparatedParam(request, "nodeId");
153161
if (nodeIds.isPresent()) {
@@ -158,7 +166,7 @@ MLStatsInput createMlStatsInputFromRequestParams(RestRequest request) {
158166
for (String state : stats.get()) {
159167
state = state.toUpperCase(Locale.ROOT);
160168
// only support cluster and node level stats for bwc
161-
if (state.startsWith("ML_NODE")) {
169+
if (ML_NODE_STAT_NAMES.contains(state)) {
162170
mlStatsInput.getNodeLevelStats().add(MLNodeLevelStat.from(state));
163171
} else {
164172
mlStatsInput.getClusterLevelStats().add(MLClusterLevelStat.from(state));

plugin/src/main/java/org/opensearch/ml/stats/MLNodeLevelStat.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
* This enum represents node level stats.
1111
*/
1212
public enum MLNodeLevelStat {
13-
ML_NODE_JVM_HEAP_USAGE,
14-
ML_NODE_EXECUTING_TASK_COUNT,
15-
ML_NODE_TOTAL_REQUEST_COUNT,
16-
ML_NODE_TOTAL_FAILURE_COUNT,
17-
ML_NODE_TOTAL_MODEL_COUNT,
18-
ML_NODE_TOTAL_CIRCUIT_BREAKER_TRIGGER_COUNT;
13+
ML_JVM_HEAP_USAGE,
14+
ML_EXECUTING_TASK_COUNT, // How many tasks are executing currently. If any task starts, then it will increase by 1,
15+
// if the task finished then it will decrease by 0.
16+
ML_REQUEST_COUNT,
17+
ML_FAILURE_COUNT,
18+
ML_DEPLOYED_MODEL_COUNT,
19+
ML_CIRCUIT_BREAKER_TRIGGER_COUNT;
1920

2021
public static MLNodeLevelStat from(String value) {
2122
try {

plugin/src/main/java/org/opensearch/ml/task/MLExecuteTaskRunner.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ protected TransportResponseHandler<MLExecuteTaskResponse> getResponseHandler(Act
8888
protected void executeTask(MLExecuteTaskRequest request, ActionListener<MLExecuteTaskResponse> listener) {
8989
threadPool.executor(EXECUTE_THREAD_POOL).execute(() -> {
9090
try {
91-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).increment();
92-
mlStats.getStat(MLNodeLevelStat.ML_NODE_TOTAL_REQUEST_COUNT).increment();
91+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).increment();
92+
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
9393
mlStats
9494
.createCounterStatIfAbsent(request.getFunctionName(), ActionName.EXECUTE, MLActionLevelStat.ML_ACTION_REQUEST_COUNT)
9595
.increment();
@@ -113,7 +113,7 @@ protected void executeTask(MLExecuteTaskRequest request, ActionListener<MLExecut
113113
.increment();
114114
listener.onFailure(e);
115115
} finally {
116-
mlStats.getStat(MLNodeLevelStat.ML_NODE_EXECUTING_TASK_COUNT).decrement();
116+
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).decrement();
117117
}
118118
});
119119
}

0 commit comments

Comments
 (0)