provide profile analyze empty interfaces (#4303)

* provide profile analyze empty interfaces

* fix comment error

* change comments

* update submodule

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
mrproliu 2020-01-31 21:11:43 +08:00 committed by GitHub
parent c7ed8cde21
commit 3252b6ed08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 96 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

@ -1 +1 @@
Subproject commit 03ed7858ea05ade81b9ceaa3abe468b422ce8110
Subproject commit 138a0573cfcc5a44a99d3063b43d314faee8654a