-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[profiling] Take care of @UpdateForV9 #123977
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| import org.elasticsearch.common.io.stream.StreamOutput; | ||
| import org.elasticsearch.common.xcontent.ChunkedToXContentHelper; | ||
| import org.elasticsearch.common.xcontent.ChunkedToXContentObject; | ||
| import org.elasticsearch.core.UpdateForV9; | ||
| import org.elasticsearch.core.UpdateForV10; | ||
| import org.elasticsearch.xcontent.ToXContent; | ||
|
|
||
| import java.io.IOException; | ||
|
|
@@ -25,9 +25,7 @@ public class GetFlamegraphResponse extends ActionResponse implements ChunkedToXC | |
| private final int size; | ||
| private final double samplingRate; | ||
| private final long selfCPU; | ||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana | ||
| private final long totalCPU; | ||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana | ||
| private final long totalSamples; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. `totalSamples is still used in Kibana, removed annotation. |
||
| private final List<Map<String, Integer>> edges; | ||
| private final List<String> fileIds; | ||
|
|
@@ -173,7 +171,7 @@ public long getTotalSamples() { | |
| return totalSamples; | ||
| } | ||
|
|
||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // change casing from Camel Case to Snake Case (requires updates in Kibana as well) | ||
| @UpdateForV10(owner = UpdateForV10.Owner.PROFILING) // change casing from Camel Case to Snake Case (requires updates in Kibana as well) | ||
| @Override | ||
| public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params) { | ||
| /* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |
| import org.elasticsearch.common.xcontent.ChunkedToXContentHelper; | ||
| import org.elasticsearch.common.xcontent.ChunkedToXContentObject; | ||
| import org.elasticsearch.core.Nullable; | ||
| import org.elasticsearch.core.UpdateForV9; | ||
| import org.elasticsearch.xcontent.ToXContent; | ||
|
|
||
| import java.util.Collections; | ||
|
|
@@ -29,10 +28,8 @@ public class GetStackTracesResponse extends ActionResponse implements ChunkedToX | |
| private final Map<String, StackFrame> stackFrames; | ||
| @Nullable | ||
| private final Map<String, String> executables; | ||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana | ||
| @Nullable | ||
| private final Map<String, TraceEvent> stackTraceEvents; | ||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana | ||
| private final int totalFrames; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need to keep this around? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Sorry, I put the comment at the wrong place: |
||
| private final double samplingRate; | ||
| private final long totalSamples; | ||
|
|
@@ -101,7 +98,6 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params | |
| stackTraceEvents, | ||
| (n, v) -> ChunkedToXContentHelper.object(n, v, entry -> (b, p) -> b.field(entry.getKey(), entry.getValue().count)) | ||
| ), | ||
| Iterators.single((b, p) -> b.field("total_frames", totalFrames)), | ||
| Iterators.single((b, p) -> b.field("sampling_rate", samplingRate)), | ||
| // the following fields are intentionally not written to the XContent representation (only needed on the transport layer): | ||
| // | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| package org.elasticsearch.xpack.profiling.action; | ||
|
|
||
| import org.elasticsearch.core.UpdateForV9; | ||
| import org.elasticsearch.core.UpdateForV10; | ||
| import org.elasticsearch.xcontent.ToXContentFragment; | ||
| import org.elasticsearch.xcontent.XContentBuilder; | ||
|
|
||
|
|
@@ -19,7 +19,7 @@ | |
| public class SubGroup implements ToXContentFragment { | ||
| private final String name; | ||
| private Long count; | ||
| @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove legacy XContent rendering | ||
| @UpdateForV10(owner = UpdateForV10.Owner.PROFILING) // remove legacy XContent rendering | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unclear why XContent is legacy. The API isn't deprecated. The profiling team hasn't any further knowledge. |
||
| private final Map<String, SubGroup> subgroups; | ||
|
|
||
| public static SubGroup root(String name) { | ||
|
|
||
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.
totalCPUis still used in Kibana, removed annotation