Package io.hyperfoil.api.config
Class PhaseBuilder<PB extends PhaseBuilder<PB>>
java.lang.Object
io.hyperfoil.api.config.PhaseBuilder<PB>
- Direct Known Subclasses:
PhaseBuilder.ClosedModel,PhaseBuilder.Noop,PhaseBuilder.OpenModel,PhaseBuilder.Sequentially
The builder creates a matrix of phases (not just single phase); we allow multiple iterations of a phase
(with increasing number of users) and multiple forks (different scenarios, but same configuration).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classPhaseBuilder.ClosedModel<T extends PhaseBuilder.ClosedModel<T>>static classstatic classstatic classPhaseBuilder.OpenModel<P extends PhaseBuilder<P>>static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,List<SLABuilder<PB>>> protected longprotected booleanprotected List<PhaseForkBuilder>protected booleanprotected longprotected intprotected final Stringprotected final BenchmarkBuilderprotected Collection<PhaseReference>protected Collection<PhaseReference>protected longprotected PhaseReferenceDelayprotected Collection<PhaseReference> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(SerializableSupplier<Benchmark> benchmark, AtomicInteger idCounter) protected PhasebuildPhase(SerializableSupplier<Benchmark> benchmark, int phaseId, int iteration, PhaseForkBuilder f) protected abstract ModelcreateModel(int iteration, double weight) duration(long duration) endPhase()forceIterations(boolean force) isWarmup(boolean isWarmup) maxDuration(long maxDuration) maxIterations(int iterations) name()static Phasenoop(SerializableSupplier<Benchmark> benchmark, int id, int iteration, String iterationName, long duration, Collection<String> startAfter, Collection<String> startAfterStrict, Collection<String> terminateAfterStrict) voidvoidreadCustomSlaFrom(PhaseBuilder<?> other) voidreadForksFrom(PhaseBuilder<?> other) scenario()protected PBself()startAfter(PhaseReference phase) startAfter(String phase) startAfterStrict(PhaseReference phase) startAfterStrict(String phase) startTime(long startTime) startWith(PhaseReferenceDelay startWith)
-
Field Details
-
name
-
parent
-
startTime
protected long startTime -
startAfter
-
startAfterStrict
-
terminateAfterStrict
-
duration
protected long duration -
maxDuration
protected long maxDuration -
maxIterations
protected int maxIterations -
forceIterations
protected boolean forceIterations -
forks
-
isWarmup
protected boolean isWarmup -
customSlas
-
startWith
-
-
Constructor Details
-
PhaseBuilder
-
-
Method Details
-
noop
public static Phase noop(SerializableSupplier<Benchmark> benchmark, int id, int iteration, String iterationName, long duration, Collection<String> startAfter, Collection<String> startAfterStrict, Collection<String> terminateAfterStrict) -
endPhase
-
name
-
scenario
-
self
-
fork
-
startTime
-
startAfter
-
startAfter
-
startAfterStrict
-
startAfterStrict
-
startWith
-
startWith
-
duration
-
maxDuration
-
maxIterations
-
prepareBuild
public void prepareBuild() -
build
-
buildPhase
protected Phase buildPhase(SerializableSupplier<Benchmark> benchmark, int phaseId, int iteration, PhaseForkBuilder f) -
readForksFrom
-
readCustomSlaFrom
-
forceIterations
-
isWarmup
-
customSla
-
createModel
-