This is an automated email from the ASF dual-hosted git repository.
wusheng 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 3252b6e provide profile analyze empty interfaces (#4303)
3252b6e is described below
commit 3252b6ed0858c0ca7b5a7b5c66c94438e2b9b286
Author: mrproliu <[email protected]>
AuthorDate: Fri Jan 31 21:11:43 2020 +0800
provide profile analyze empty interfaces (#4303)
* provide profile analyze empty interfaces
* fix comment error
* change comments
* update submodule
Co-authored-by: 吴晟 Wu Sheng <[email protected]>
---
.../core/query/entity/ProfileAnalyzation.java | 35 ++++++++++++++++
.../core/query/entity/ProfileStackElement.java | 48 ++++++++++++++++++++++
.../oap/query/graphql/resolver/ProfileQuery.java | 12 ++++++
.../src/main/resources/query-protocol | 2 +-
4 files changed, 96 insertions(+), 1 deletion(-)
diff --git
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileAnalyzation.java
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileAnalyzation.java
new file mode 100644
index 0000000..f6b444e
--- /dev/null
+++
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileAnalyzation.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.oap.server.core.query.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author MrPro
+ */
+@Getter
+@Setter
+public class ProfileAnalyzation {
+
+ private List<ProfileStackElement> stack;
+
+}
diff --git
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileStackElement.java
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileStackElement.java
new file mode 100644
index 0000000..f97ae5e
--- /dev/null
+++
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/entity/ProfileStackElement.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.oap.server.core.query.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author MrPro
+ */
+@Getter
+@Setter
+public class ProfileStackElement {
+
+ // stack code signature
+ private String codeSignature;
+
+ // include the execution time of children(millisecond)
+ private int duration;
+
+ // exclude the execution time of children(millisecond)
+ private int durationChildExcluded;
+
+ // continuous dump count
+ private int count;
+
+ // children of this stack code sign
+ private List<ProfileStackElement> childs;
+
+}
diff --git
a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/ProfileQuery.java
b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/ProfileQuery.java
index 5fec074..5c9abb2 100644
---
a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/ProfileQuery.java
+++
b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/ProfileQuery.java
@@ -21,10 +21,13 @@ package org.apache.skywalking.oap.query.graphql.resolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.query.ProfileTaskQueryService;
+import org.apache.skywalking.oap.server.core.query.entity.BasicTrace;
+import org.apache.skywalking.oap.server.core.query.entity.ProfileAnalyzation;
import org.apache.skywalking.oap.server.core.query.entity.ProfileTask;
import org.apache.skywalking.oap.server.library.module.ModuleManager;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
/**
@@ -52,5 +55,14 @@ public class ProfileQuery implements GraphQLQueryResolver {
return getProfileTaskQueryService().getTaskList(serviceId,
endpointName);
}
+ public List<BasicTrace> getProfileTaskSegmentList(final String taskID) {
+ return Collections.emptyList();
+ }
+
+ public ProfileAnalyzation getProfileAnalyze(final String segmentId, final
long start, final long end) {
+ ProfileAnalyzation analyzation = new ProfileAnalyzation();
+ analyzation.setStack(Collections.emptyList());
+ return analyzation;
+ }
}
diff --git
a/oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
b/oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
index 03ed785..138a057 160000
---
a/oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
+++
b/oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
@@ -1 +1 @@
-Subproject commit 03ed7858ea05ade81b9ceaa3abe468b422ce8110
+Subproject commit 138a0573cfcc5a44a99d3063b43d314faee8654a