1 package com.griddynamics.jagger.user.test.configurations.load;
3 import com.griddynamics.jagger.user.test.configurations.load.auxiliary.InvocationCount;
4 import com.griddynamics.jagger.user.test.configurations.load.auxiliary.ThreadCount;
6 import java.util.Objects;
38 private final int invocationCount;
39 private final int threadCount;
40 private final int delayBetweenInvocationsInMilliseconds;
41 private final int periodInSeconds;
42 private final int tickInterval;
45 this.invocationCount = builder.invocationCount;
46 this.threadCount = builder.threadCount;
47 this.delayBetweenInvocationsInMilliseconds = builder.delayBetweenInvocationsInMilliseconds;
48 this.periodInSeconds = builder.periodInSeconds;
49 this.tickInterval = builder.tickInterval;
63 return new Builder(invocationCount, threadCount);
67 static final int DEFAULT_TICK_INTERVAL = 1000;
68 static final int DEFAULT_PERIOD = -1;
69 static final int DEFAULT_DELAY = 0;
70 private int invocationCount;
71 private int threadCount;
72 private int delayBetweenInvocationsInMilliseconds;
73 private int periodInSeconds;
75 private int tickInterval;
78 Objects.requireNonNull(invocationCount);
79 Objects.requireNonNull(threadCount);
81 this.tickInterval = DEFAULT_TICK_INTERVAL;
82 this.periodInSeconds = DEFAULT_PERIOD;
83 this.delayBetweenInvocationsInMilliseconds = DEFAULT_DELAY;
85 this.invocationCount = invocationCount.
value();
86 this.threadCount = threadCount.
value();
95 this.delayBetweenInvocationsInMilliseconds = delay;
105 this.periodInSeconds = period;
126 return invocationCount;
130 return delayBetweenInvocationsInMilliseconds;
134 return periodInSeconds;