Skip to content

Commit 4bf086a

Browse files
committed
[Profiling] Fix ES queries for serverless
1 parent aaf7b73 commit 4bf086a

File tree

3 files changed

+163
-139
lines changed

3 files changed

+163
-139
lines changed

x-pack/plugin/profiling/src/internalClusterTest/java/org/elasticsearch/xpack/profiling/action/GetStackTracesActionIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public void testGetStackTracesGroupedByServiceName() throws Exception {
9898
TransportGetStackTracesAction.DEFAULT_SAMPLING_FREQUENCY
9999
);
100100
assertEquals(2L, response.getStackTraceEvents().get(traceEventID).count);
101-
assertEquals(Long.valueOf(2L), response.getStackTraceEvents().get(traceEventID).subGroups.getCount("basket"));
102101

103102
assertNotNull(response.getStackTraces());
104103
// just do a high-level spot check. Decoding is tested in unit-tests

x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesResponseBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class GetStackTracesResponseBuilder {
2020
private Map<TraceEventID, TraceEvent> stackTraceEvents;
2121
private double samplingRate;
2222
private long totalSamples;
23+
private long samplingFrequency;
2324
private Double requestedDuration;
2425
private final Double awsCostFactor;
2526
private final Double azureCostFactor;
@@ -155,4 +156,12 @@ public GetStackTracesResponse build() {
155156
}
156157
return new GetStackTracesResponse(stackTraces, stackFrames, executables, stackTraceEvents, totalFrames, samplingRate, totalSamples);
157158
}
159+
160+
public void setSamplingFrequency(long samplingFrequency) {
161+
this.samplingFrequency = samplingFrequency;
162+
}
163+
164+
public long getSamplingFrequency() {
165+
return samplingFrequency;
166+
}
158167
}

0 commit comments

Comments
 (0)