Skip to content

Commit dcf2796

Browse files
committed
fix(delete no use variable,roll back kong)
1 parent 2f89908 commit dcf2796

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

oap-server/server-library/library-pprof-parser/src/main/java/org/apache/skywalking/oap/server/library/pprof/parser/PprofSegmentParser.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.apache.skywalking.oap.server.library.pprof.parser;
2020

2121
import com.google.perftools.profiles.ProfileProto;
22-
import java.io.IOException;
2322
import java.util.ArrayList;
2423
import java.util.HashMap;
2524
import java.util.LinkedHashSet;
@@ -96,8 +95,7 @@ public void setCount(long count) {
9695
/**
9796
* Parse pprof profile and extract all segment information
9897
*/
99-
public static List<SegmentInfo> parseSegments(ProfileProto.Profile profile) throws IOException {
100-
List<SegmentInfo> segments = new ArrayList<>();
98+
public static List<SegmentInfo> parseSegments(ProfileProto.Profile profile) {
10199
List<String> stringTable = profile.getStringTableList();
102100

103101
// Group samples by segmentId
@@ -111,6 +109,7 @@ public static List<SegmentInfo> parseSegments(ProfileProto.Profile profile) thro
111109
}
112110

113111
// Create SegmentInfo for each segment
112+
List<SegmentInfo> result = new ArrayList<>(segmentSamples.size());
114113
for (Map.Entry<String, List<ProfileProto.Sample>> entry : segmentSamples.entrySet()) {
115114
String segmentId = entry.getKey();
116115
List<ProfileProto.Sample> samples = entry.getValue();
@@ -134,10 +133,10 @@ public static List<SegmentInfo> parseSegments(ProfileProto.Profile profile) thro
134133
.sum();
135134
segmentInfo.setCount(totalCount);
136135

137-
segments.add(segmentInfo);
136+
result.add(segmentInfo);
138137
}
139138

140-
return segments;
139+
return result;
141140
}
142141

143142
/**

test/e2e-v2/cases/kong/docker-compose.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ services:
105105
depends_on:
106106
oap:
107107
condition: service_healthy
108-
echo:
109-
image: ealen/echo-server:latest
110-
networks:
111-
- e2e
112-
environment:
113-
- ENABLE__ENV=true
114-
expose:
115-
- 80
116108
kong-mock:
117109
image: curlimages/curl:8.10.1
118110
networks:

test/e2e-v2/cases/kong/kong-e2e-data-mock.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ curl -i -X POST http://kong-1:8001/plugins \
3333
# Add a mock service and route
3434
curl -i -s -X POST http://kong-1:8001/services \
3535
--data name=sw_service \
36-
--data url='http://echo:80'
36+
--data url='http://httpbin.konghq.com'
3737
curl -i -X POST http://kong-1:8001/services/sw_service/routes \
3838
--data 'paths[]=/mock' \
3939
--data name=sw_route
4040

4141
while true
4242
do
4343
curl -s -i http://kong-1:8000/mock/anything > /dev/null
44-
sleep 1
44+
sleep 5
4545
done

test/e2e-v2/cases/kong/otel-collector-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ receivers:
1919
scrape_configs:
2020
- job_name: 'kong-monitoring'
2121
metrics_path: "/metrics"
22-
scrape_interval: 5s
22+
scrape_interval: 10s
2323
static_configs:
2424
- targets: ['kong-1:8001']
2525
labels:

0 commit comments

Comments
 (0)