Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
JLimitVsBaseline.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations.limits;
2 
3 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.JMetricName;
4 import com.griddynamics.jagger.util.StandardMetricsNamesUtil;
5 
6 import java.util.Objects;
7 
11 public class JLimitVsBaseline extends JLimit {
12 
14  super(builder);
15  }
16 
23  public static Builder builder(String metricId) {
24  return new Builder(metricId);
25  }
26 
27 
37  public static Builder builder(String scenarioId, String stepId, String metricId) {
38  return new Builder(StandardMetricsNamesUtil.generateScenarioStepMetricRegexp(scenarioId, stepId, metricId));
39  }
40 
47  public static Builder builder(JMetricName metricId) {
48  return new Builder(metricId.transformToString());
49  }
50 
60  public static Builder builder(String scenarioId, String stepId, JMetricName metricId) {
61  return new Builder(StandardMetricsNamesUtil.generateScenarioStepMetricRegexp(scenarioId, stepId, metricId.transformToString()));
62  }
63 
64  public static class Builder extends JLimit.Builder {
65 
66  private Builder(String metricId) {
67  Objects.requireNonNull(metricId);
68  this.metricId = metricId;
69  }
70 
71  @Override
72  public JLimit build() {
73  return new JLimitVsBaseline(this);
74  }
75  }
76 }