Fix GraphQL profile queried error when cannot matches any snapshot (#4490)
* Fix GraphQL profile queried error when cannot matches any snapshot * fix adding list bug Co-authored-by: Mrproliu <mrproliu@lagou.com> Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
parent
39489ebc1e
commit
cd2fb513a6
|
|
@ -88,7 +88,10 @@ public class ProfileAnalyzer {
|
|||
}).flatMap(Collection::stream).map(ProfileStack::deserialize).distinct().collect(Collectors.toList());
|
||||
|
||||
// analyze
|
||||
analyzation.setTrees(analyze(stacks));
|
||||
final List<ProfileStackTree> trees = analyze(stacks);
|
||||
if (trees != null) {
|
||||
analyzation.getTrees().addAll(trees);
|
||||
}
|
||||
|
||||
return analyzation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.core.query.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
|
@ -33,4 +34,7 @@ public class ProfileAnalyzation {
|
|||
// thread stack dump analyze trees
|
||||
private List<ProfileStackTree> trees;
|
||||
|
||||
public ProfileAnalyzation() {
|
||||
this.trees = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue