You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2020/04/22 11:26:18 UTC

[skywalking] branch master updated: Fix profile recheck error (#4690)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e82141  Fix profile recheck error (#4690)
4e82141 is described below

commit 4e821415ea8b930d3c089346d86c650788cbbf8a
Author: mrproliu <74...@qq.com>
AuthorDate: Wed Apr 22 19:25:56 2020 +0800

    Fix profile recheck error (#4690)
---
 apm-checkstyle/checkStyle.xml                      |   2 +-
 .../apm/agent/core/context/tag/Tags.java           |   2 +-
 .../apm/agent/core/profile/ThreadProfiler.java     |   7 +-
 .../e2e/profile/query/ProfileStackTreeMatcher.java |  17 +-
 .../apache/skywalking/e2e/Service0Application.java |   2 +
 .../apache/skywalking/e2e/profile/CreateUser.java  |   2 +-
 .../skywalking/e2e/profile/ProfileController.java  |   4 +-
 .../apache/skywalking/e2e/profile/ProfileE2E.java  |   2 +-
 .../test/resources/expected/profile/endpoints.yml  |   4 +-
 .../test/resources/expected/profile/finished.yml   |   2 +-
 .../test/resources/expected/profile/notified.yml   |   2 +-
 .../expected/profile/profileAnayzation.yml         | 342 +--------------------
 .../resources/expected/profile/profileSegment.yml  |   2 +-
 .../resources/expected/profile/profileSegments.yml |   2 +-
 tools/coverage/report.sh                           |   1 +
 15 files changed, 37 insertions(+), 356 deletions(-)

diff --git a/apm-checkstyle/checkStyle.xml b/apm-checkstyle/checkStyle.xml
index daa3e20..9958d8f 100755
--- a/apm-checkstyle/checkStyle.xml
+++ b/apm-checkstyle/checkStyle.xml
@@ -96,7 +96,7 @@
             <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
         </module>
         <module name="PackageName">
-            <property name="format" value="^org\.apache\.skywalking(\.[a-zA-Z][a-zA-Z0-9]*)+$"/>
+            <property name="format" value="^(org|test)\.apache\.skywalking(\.[a-zA-Z][a-zA-Z0-9]*)+$"/>
         </module>
         <module name="ParameterName"/>
         <module name="StaticVariableName">
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
index bafa799..9d36386 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
@@ -80,7 +80,7 @@ public final class Tags {
     public static final class HTTP {
         public static final StringTag METHOD = new StringTag(10, "http.method");
 
-        public static final StringTag PARAMS = new StringTag(11, "http.params");
+        public static final StringTag PARAMS = new StringTag(11, "http.params", true);
     }
 
     /**
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ThreadProfiler.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ThreadProfiler.java
index 37254b0..856f129 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ThreadProfiler.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ThreadProfiler.java
@@ -50,7 +50,12 @@ public class ThreadProfiler {
         this.traceSegmentId = traceSegmentId;
         this.profilingThread = profilingThread;
         this.executionContext = executionContext;
-        this.profilingStatus = ProfileStatusReference.createWithPending();
+        if (tracingContext.profileStatus() == null) {
+            this.profilingStatus = ProfileStatusReference.createWithPending();
+        } else {
+            this.profilingStatus = tracingContext.profileStatus();
+            this.profilingStatus.updateStatus(ProfileStatus.PENDING);
+        }
         this.profilingMaxTimeMills = TimeUnit.MINUTES.toMillis(Config.Profile.MAX_DURATION);
     }
 
diff --git a/test/e2e/e2e-data/src/main/java/org/apache/skywalking/e2e/profile/query/ProfileStackTreeMatcher.java b/test/e2e/e2e-data/src/main/java/org/apache/skywalking/e2e/profile/query/ProfileStackTreeMatcher.java
index b9eeeaf..a59a7ad 100644
--- a/test/e2e/e2e-data/src/main/java/org/apache/skywalking/e2e/profile/query/ProfileStackTreeMatcher.java
+++ b/test/e2e/e2e-data/src/main/java/org/apache/skywalking/e2e/profile/query/ProfileStackTreeMatcher.java
@@ -23,7 +23,6 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 import org.apache.skywalking.e2e.verification.AbstractMatcher;
-import org.assertj.core.api.Assertions;
 
 @Data
 @ToString(callSuper = true)
@@ -34,12 +33,22 @@ public class ProfileStackTreeMatcher extends AbstractMatcher<ProfileAnalyzation.
 
     @Override
     public void verify(ProfileAnalyzation.ProfileStackTree profileStackTree) {
-        Assertions.assertThat(profileStackTree.getElements()).hasSameSizeAs(this.elements);
-
         int size = this.elements.size();
 
         for (int i = 0; i < size; i++) {
-            elements.get(i).verify(profileStackTree.getElements().get(i));
+            boolean hasVerified = false;
+            for (int dataElement = 0; dataElement < profileStackTree.getElements().size(); dataElement++) {
+                try {
+                    elements.get(i).verify(profileStackTree.getElements().get(dataElement));
+                    hasVerified = true;
+                    break;
+                } catch (Throwable e) {
+                }
+            }
+
+            if (!hasVerified) {
+                throw new IllegalStateException("Cannot found " + elements.get(i).getCodeSignature());
+            }
         }
     }
 }
\ No newline at end of file
diff --git a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java b/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java
index 0d53914..4042545 100644
--- a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java
+++ b/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java
@@ -20,10 +20,12 @@ package org.apache.skywalking.e2e;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 
 @EnableJpaRepositories
 @SpringBootApplication
+@ComponentScan({"org.apache.skywalking", "test.apache.skywalking"})
 public class Service0Application {
     public static void main(String[] args) {
         SpringApplication.run(Service0Application.class, args);
diff --git a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/CreateUser.java b/test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java
similarity index 95%
rename from test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/CreateUser.java
rename to test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java
index f31e8a5..30cb74a 100644
--- a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/CreateUser.java
+++ b/test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java
@@ -16,7 +16,7 @@
  *
  */
 
-package org.apache.skywalking.e2e.profile;
+package test.apache.skywalking.e2e.profile;
 
 import lombok.Data;
 import org.apache.skywalking.e2e.User;
diff --git a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/ProfileController.java b/test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java
similarity index 95%
rename from test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/ProfileController.java
rename to test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java
index 45a4f0c..b939a84 100644
--- a/test/e2e/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/profile/ProfileController.java
+++ b/test/e2e/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java
@@ -16,7 +16,7 @@
  *
  */
 
-package org.apache.skywalking.e2e.profile;
+package test.apache.skywalking.e2e.profile;
 
 import java.util.concurrent.TimeUnit;
 import lombok.RequiredArgsConstructor;
@@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
 public class ProfileController {
     private final UserRepo userRepo;
 
-    @PostMapping("/profile/users")
+    @PostMapping("/profile/{name}")
     public User createAuthor(@RequestBody final CreateUser createUser) throws InterruptedException {
         final User user = userRepo.save(createUser.toUser());
         if (createUser.isEnableProfiling()) {
diff --git a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java
index 6be9faf..77256bf 100644
--- a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java
+++ b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java
@@ -141,7 +141,7 @@ public class ProfileE2E extends SkyWalkingTestAdapter {
     void createProfileTask() throws Exception {
         final ProfileTaskCreationRequest creationRequest = ProfileTaskCreationRequest.builder()
                                                                                      .serviceId("ZTJlLXByb2ZpbGUtc2VydmljZQ==.1")
-                                                                                     .endpointName("/profile/users")
+                                                                                     .endpointName("/profile/{name}")
                                                                                      .duration(1)
                                                                                      .startTime(-1)
                                                                                      .minDurationThreshold(1500)
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/endpoints.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/endpoints.yml
index 9d0f8f1..c9a192d 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/endpoints.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/endpoints.yml
@@ -14,5 +14,5 @@
 # limitations under the License.
 
 endpoints:
-  - key: ZTJlLXByb2ZpbGUtc2VydmljZQ==.1_L3Byb2ZpbGUvdXNlcnM=
-    label: /profile/users
+  - key: ZTJlLXByb2ZpbGUtc2VydmljZQ==.1_L3Byb2ZpbGUve25hbWV9
+    label: /profile/{name}
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/finished.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/finished.yml
index 1e2959e..6cf91ba 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/finished.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/finished.yml
@@ -16,7 +16,7 @@
 tasks:
   - id: not null
     serviceId: ZTJlLXByb2ZpbGUtc2VydmljZQ==.1
-    endpointName: /profile/users
+    endpointName: /profile/{name}
     startTime: gt 0
     duration: gt 0
     minDurationThreshold: gt 0
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/notified.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/notified.yml
index 3ff09f1..2d36360 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/notified.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/notified.yml
@@ -16,7 +16,7 @@
 tasks:
   - id: not null
     serviceId: ZTJlLXByb2ZpbGUtc2VydmljZQ==.1
-    endpointName: /profile/users
+    endpointName: /profile/{name}
     startTime: gt 0
     duration: gt 0
     minDurationThreshold: gt 0
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/profileAnayzation.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/profileAnayzation.yml
index 65d2b04..30dbc70 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/profileAnayzation.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/profileAnayzation.yml
@@ -20,345 +20,9 @@ elements:
     duration: gt 0
     durationChildExcluded: 0
     count: gt 0
-  - id: 2
-    parentId: 1
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 3
-    parentId: 2
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 4
-    parentId: 3
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 5
-    parentId: 4
-    codeSignature: org.apache.tomcat.util.net.SocketProcessorBase.run:49
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 6
-    parentId: 5
-    codeSignature: org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun:1639
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 7
-    parentId: 6
-    codeSignature: org.apache.coyote.AbstractProtocol$ConnectionHandler.process:868
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 8
-    parentId: 7
-    codeSignature: org.apache.coyote.AbstractProcessorLight.process:65
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 9
-    parentId: 8
-    codeSignature: org.apache.coyote.http11.Http11Processor.service:367
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 10
-    parentId: 9
-    codeSignature: org.apache.catalina.connector.CoyoteAdapter.service:343
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 11
-    parentId: 10
-    codeSignature: org.apache.catalina.core.StandardEngineValve.invoke:74
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 12
-    parentId: 11
-    codeSignature: org.apache.catalina.valves.ErrorReportValve.invoke:92
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 13
-    parentId: 12
-    codeSignature: org.apache.catalina.core.StandardHostValve.invoke:-1
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 14
-    parentId: 13
-    codeSignature: org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept:86
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 15
-    parentId: 14
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 16
-    parentId: 15
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 17
-    parentId: 16
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 18
-    parentId: 17
-    codeSignature: org.apache.catalina.authenticator.AuthenticatorBase.invoke:541
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 19
-    parentId: 18
-    codeSignature: org.apache.catalina.core.StandardContextValve.invoke:96
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 20
-    parentId: 19
-    codeSignature: org.apache.catalina.core.StandardWrapperValve.invoke:202
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 21
-    parentId: 20
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.doFilter:166
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 22
-    parentId: 21
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter:193
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 23
-    parentId: 22
-    codeSignature: org.springframework.web.filter.OncePerRequestFilter.doFilter:119
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 24
-    parentId: 23
-    codeSignature: org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal:201
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 25
-    parentId: 24
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.doFilter:166
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 26
-    parentId: 25
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter:193
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 27
-    parentId: 26
-    codeSignature: org.springframework.web.filter.OncePerRequestFilter.doFilter:119
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 28
-    parentId: 27
-    codeSignature: org.springframework.web.filter.FormContentFilter.doFilterInternal:93
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 29
-    parentId: 28
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.doFilter:166
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 30
-    parentId: 29
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter:193
+  - id: gt 0
+    parentId: gt 0
+    codeSignature: test.apache.skywalking.e2e.profile.ProfileController.createAuthor:-1
     duration: gt 0
     durationChildExcluded: 0
     count: gt 0
-  - id: 31
-    parentId: 30
-    codeSignature: org.springframework.web.filter.OncePerRequestFilter.doFilter:119
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 32
-    parentId: 31
-    codeSignature: org.springframework.web.filter.RequestContextFilter.doFilterInternal:100
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 33
-    parentId: 32
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.doFilter:166
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 34
-    parentId: 33
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter:193
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 35
-    parentId: 34
-    codeSignature: org.apache.tomcat.websocket.server.WsFilter.doFilter:53
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 36
-    parentId: 35
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.doFilter:166
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 37
-    parentId: 36
-    codeSignature: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter:231
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 38
-    parentId: 37
-    codeSignature: javax.servlet.http.HttpServlet.service:741
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 39
-    parentId: 38
-    codeSignature: org.springframework.web.servlet.FrameworkServlet.service:883
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 40
-    parentId: 39
-    codeSignature: javax.servlet.http.HttpServlet.service:660
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 41
-    parentId: 40
-    codeSignature: org.springframework.web.servlet.FrameworkServlet.doPost:909
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 42
-    parentId: 41
-    codeSignature: org.springframework.web.servlet.FrameworkServlet.processRequest:1006
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 43
-    parentId: 42
-    codeSignature: org.springframework.web.servlet.DispatcherServlet.doService:943
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 44
-    parentId: 43
-    codeSignature: org.springframework.web.servlet.DispatcherServlet.doDispatch:1040
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 45
-    parentId: 44
-    codeSignature: org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle:87
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 46
-    parentId: 45
-    codeSignature: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal:793
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 47
-    parentId: 46
-    codeSignature: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod:879
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 48
-    parentId: 47
-    codeSignature: org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle:106
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 49
-    parentId: 48
-    codeSignature: org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest:138
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 50
-    parentId: 49
-    codeSignature: org.springframework.web.method.support.InvocableHandlerMethod.doInvoke:190
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 51
-    parentId: 50
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 52
-    parentId: 51
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 53
-    parentId: 52
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 54
-    parentId: 53
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 55
-    parentId: 54
-    codeSignature: org.apache.skywalking.e2e.profile.ProfileController.createAuthor:38
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 56
-    parentId: 55
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 57
-    parentId: 56
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: 0
-    count: gt 0
-  - id: 58
-    parentId: 57
-    codeSignature: not null
-    duration: gt 0
-    durationChildExcluded: gt 0
-    count: gt 0
\ No newline at end of file
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegment.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegment.yml
index f6646e4..444c49f 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegment.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegment.yml
@@ -19,7 +19,7 @@ spans:
     serviceCode: not null
     startTime: gt 0
     endTime: gt 0
-    endpointName: /profile/users
+    endpointName: /profile/{name}
     tags:
       - key: url
         value: not null
diff --git a/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegments.yml b/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegments.yml
index 842e24d..900758b 100644
--- a/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegments.yml
+++ b/test/e2e/e2e-test/src/test/resources/expected/profile/profileSegments.yml
@@ -16,7 +16,7 @@
 traces:
   - key: not null
     endpointNames:
-      - /profile/users
+      - /profile/{name}
     duration: ge 0
     start: gt 0
     isError: false
diff --git a/tools/coverage/report.sh b/tools/coverage/report.sh
index 7953a25..09041e1 100755
--- a/tools/coverage/report.sh
+++ b/tools/coverage/report.sh
@@ -32,6 +32,7 @@ for exec_data in "${JACOCO_HOME}"/*.exec; do
   sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/oap/server/core/query/entity || true
   sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/testcase || true
   sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/e2e || true
+  sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/test/apache/skywalking/e2e || true
 
   java -jar "${JACOCO_HOME}"/jacococli.jar report \
     --classfiles "${JACOCO_HOME}"/classes/"$exec_data" \