Skip to content

Commit

Permalink
fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Sep 18, 2024
1 parent 88eb0f0 commit 764d2ff
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/reference/rest-api/usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ GET /_xpack/usage
}
}
},
"node_count" : 1
"node_count" : 1,
"memory": {
anomaly_detectors_memory_bytes: 0,
data_frame_analytics_memory_bytes: 0,
pytorch_inference_memory_bytes: 0,
total_used_memory_bytes: 0
}
},
"inference": {
"available" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,22 @@ public Map<String, Object> getMemoryUsage() {
public int getNodeCount() {
return nodeCount;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MachineLearningFeatureSetUsage that = (MachineLearningFeatureSetUsage) o;
return nodeCount == that.nodeCount
&& Objects.equals(jobsUsage, that.jobsUsage)
&& Objects.equals(datafeedsUsage, that.datafeedsUsage)
&& Objects.equals(analyticsUsage, that.analyticsUsage)
&& Objects.equals(inferenceUsage, that.inferenceUsage)
&& Objects.equals(memoryUsage, that.memoryUsage);
}

@Override
public int hashCode() {
return Objects.hash(jobsUsage, datafeedsUsage, analyticsUsage, inferenceUsage, memoryUsage, nodeCount);
}
}

0 comments on commit 764d2ff

Please sign in to comment.