com.hubspot.chrome.devtools.client.core.heapprofiler.SamplingHeapProfileNode Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.heapprofiler;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.runtime.CallFrame;
import java.util.List;
/**
* Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
*/
public final class SamplingHeapProfileNode {
private CallFrame callFrame;
private Number selfSize;
private List children;
@JsonCreator
public SamplingHeapProfileNode(@JsonProperty("callFrame") CallFrame callFrame,
@JsonProperty("selfSize") Number selfSize,
@JsonProperty("children") List children) {
this.callFrame = callFrame;
this.selfSize = selfSize;
this.children = children;
}
public CallFrame getCallFrame() {
return callFrame;
}
public Number getSelfSize() {
return selfSize;
}
public List getChildren() {
return children;
}
public static SamplingHeapProfileNode.Builder builder() {
return new SamplingHeapProfileNode.Builder();
}
public static final class Builder {
private CallFrame callFrame;
private Number selfSize;
private List children;
private Builder() {
}
public SamplingHeapProfileNode.Builder setCallFrame(CallFrame callFrame) {
this.callFrame = callFrame;
return this;
}
public SamplingHeapProfileNode.Builder setSelfSize(Number selfSize) {
this.selfSize = selfSize;
return this;
}
public SamplingHeapProfileNode.Builder setChildren(List children) {
this.children = children;
return this;
}
public SamplingHeapProfileNode build() {
return new SamplingHeapProfileNode(callFrame, selfSize, children);
}
}
}