Package io.hyperfoil.api.config
Class SLABuilder<P>
java.lang.Object
io.hyperfoil.api.config.SLABuilder<P>
- All Implemented Interfaces:
BuilderBase<SLABuilder<P>>
Defines a Service Level Agreement (SLA) - conditions that must hold for benchmark to be deemed successful.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassPercentile limits.static classDefines a list of Service Level Agreements (SLAs) - conditions that must hold for benchmark to be deemed successful.Nested classes/interfaces inherited from interface io.hyperfoil.api.config.BuilderBase
BuilderBase.CopyUtil, BuilderBase.IgnoreCopy, BuilderBase.ThrowingSupplier<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockedRatio(double blockedRatio) Maximum allowed ratio of time spent waiting for usable connection to sum of response latencies and blocked time.build()endSLA()errorRatio(double errorRatio) Maximum allowed ratio of errors: connection failures or resets, timeouts and internal errors.invalidRatio(double invalidRatio) Maximum allowed ratio of requests with responses marked as invalid.limits()Percentile limits.meanResponseTime(long meanResponseTime, TimeUnit timeUnit) meanResponseTime(String meanResponseTime) Maximum allowed mean (average) response time.voidPeriod over which the stats should be collected.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.hyperfoil.api.config.BuilderBase
copy
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
SLABuilder
-
-
Method Details
-
prepareBuild
public void prepareBuild()- Specified by:
prepareBuildin interfaceBuilderBase<P>
-
build
-
endSLA
-
window
-
window
Period over which the stats should be collected. By default the SLA applies to stats from whole phase.- Parameters:
window- Window size with suffix ('s', 'm' or 'h') or just in milliseconds.- Returns:
- Self.
-
errorRatio
Maximum allowed ratio of errors: connection failures or resets, timeouts and internal errors. Valid values are 0.0 - 1.0 (inclusive). Note: 4xx and 5xx statuses are NOT considered errors for this SLA parameter. UseinvalidRatiofor that.- Parameters:
errorRatio- Ratio.- Returns:
- Self.
-
invalidRatio
Maximum allowed ratio of requests with responses marked as invalid. Valid values are 0.0 - 1.0 (inclusive). Note: With default settings 4xx and 5xx statuses are considered invalid. Check outergonomics.autoRangeCheckorhttpRequest.handler.autoRangeCheckto change this.- Parameters:
invalidRatio- Ratio.- Returns:
- Self.
-
meanResponseTime
-
meanResponseTime
Maximum allowed mean (average) response time. Use suffix `ns`, `us`, `ms` or `s` to specify units.- Parameters:
meanResponseTime- Mean response time.- Returns:
- Self.
-
blockedRatio
Maximum allowed ratio of time spent waiting for usable connection to sum of response latencies and blocked time. Default is 0 - client must not be blocked. Set to 1 if the client can block without limits.- Parameters:
blockedRatio- Maximum ratio.- Returns:
- Self.
-
limits
Percentile limits.- Returns:
- Builder.
-