-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script: compile/cache eviction history metric placeholders #78257
Script: compile/cache eviction history metric placeholders #78257
Conversation
Adds 5m/15m/24h metrics to _nodes/stats when those metrics are non-zero. Those metrics are not yet populated. BWC: history metrics are only sent between v8.0.0+ nodes, v7.16.0 nodes will not send those metrics until they are populated. Refs: elastic#62899
Pinging @elastic/es-core-infra (Team:Core/Infra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok, just a few comments.
server/src/main/java/org/elasticsearch/script/ScriptContextStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/script/ScriptContextStats.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStatsTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/script/ScriptContextStats.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple of minor comments from me.
server/src/main/java/org/elasticsearch/script/ScriptContextStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/script/ScriptContextStats.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one last nit
@@ -555,11 +558,26 @@ public static NodeStats createNodeStats() { | |||
List<ScriptContextStats> stats = new ArrayList<>(numContents); | |||
HashSet<String> contexts = new HashSet<>(); | |||
for (int i = 0; i < numContents; i++) { | |||
List<ScriptContextStats.TimeSeries> timeSeries = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be more readable if it was moved to a helper function, eg randomTimeSeries()
, then it can be used below inline, without needing this weirdness with a length 2 list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved.
💔 Backport failed
You can use sqren/backport to manually backport by running |
…8257) Adds 5m/15m/24h metrics to _nodes/stats when those metrics are non-zero. Those metrics are not yet populated. BWC: history metrics are only sent between v8.0.0+ nodes, v7.16.0 nodes will not send those metrics until they are populated. Refs: elastic#62899 Backport: db75c4b
Adds 5m/15m/24h metrics to _nodes/stats when those metrics
are non-zero. Those metrics are not yet populated.
BWC: history metrics are only sent between v8.0.0+ nodes,
v7.16.0 nodes will not send those metrics until they are populated.
Refs: #62899