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

com.hubspot.chrome.devtools.client.core.performance.Metric Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Run-time execution metric.
 */
public final class Metric {
  private String name;

  private Number value;

  @JsonCreator
  public Metric(@JsonProperty("name") String name, @JsonProperty("value") Number value) {
    this.name = name;
    this.value = value;
  }

  public String getName() {
    return name;
  }

  public Number getValue() {
    return value;
  }

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

  public static final class Builder {
    private String name;

    private Number value;

    private Builder() {
    }

    public Metric.Builder setName(String name) {
      this.name = name;
      return this;
    }

    public Metric.Builder setValue(Number value) {
      this.value = value;
      return this;
    }

    public Metric build() {
      return new Metric(name, value);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy