All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.profiler.ProfileNode Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.profiler;

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;

/**
 * Profile node. Holds callsite information, execution statistics and child nodes.
 */
public final class ProfileNode {
  private Integer id;

  private CallFrame callFrame;

  private Integer hitCount;

  private List children;

  private String deoptReason;

  private List positionTicks;

  @JsonCreator
  public ProfileNode(@JsonProperty("id") Integer id, @JsonProperty("callFrame") CallFrame callFrame,
      @JsonProperty("hitCount") Integer hitCount, @JsonProperty("children") List children,
      @JsonProperty("deoptReason") String deoptReason,
      @JsonProperty("positionTicks") List positionTicks) {
    this.id = id;
    this.callFrame = callFrame;
    this.hitCount = hitCount;
    this.children = children;
    this.deoptReason = deoptReason;
    this.positionTicks = positionTicks;
  }

  public Integer getId() {
    return id;
  }

  public CallFrame getCallFrame() {
    return callFrame;
  }

  public Integer getHitCount() {
    return hitCount;
  }

  public List getChildren() {
    return children;
  }

  public String getDeoptReason() {
    return deoptReason;
  }

  public List getPositionTicks() {
    return positionTicks;
  }

  public static ProfileNode.Builder builder() {
    return new ProfileNode.Builder();
  }

  public static final class Builder {
    private Integer id;

    private CallFrame callFrame;

    private Integer hitCount;

    private List children;

    private String deoptReason;

    private List positionTicks;

    private Builder() {
    }

    public ProfileNode.Builder setId(Integer id) {
      this.id = id;
      return this;
    }

    public ProfileNode.Builder setCallFrame(CallFrame callFrame) {
      this.callFrame = callFrame;
      return this;
    }

    public ProfileNode.Builder setHitCount(Integer hitCount) {
      this.hitCount = hitCount;
      return this;
    }

    public ProfileNode.Builder setChildren(List children) {
      this.children = children;
      return this;
    }

    public ProfileNode.Builder setDeoptReason(String deoptReason) {
      this.deoptReason = deoptReason;
      return this;
    }

    public ProfileNode.Builder setPositionTicks(List positionTicks) {
      this.positionTicks = positionTicks;
      return this;
    }

    public ProfileNode build() {
      return new ProfileNode(id, callFrame, hitCount, children, deoptReason, positionTicks);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy