Interface Performance
- All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<Performance>, Serializable
@Sources({"system:properties","file:src/main/resources/properties/performance.properties","file:src/main/resources/properties/default/performance.properties","classpath:performance.properties"})
public interface Performance
extends EngineProperties<Performance>
Configuration properties interface for performance testing settings in the SHAFT framework.
Controls Lighthouse audit thresholds and performance measurement parameters.
Use set() to override values programmatically:
SHAFT.Properties.performance.set().lighthouseExecution(true);
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.aeonbits.owner.Config
org.aeonbits.owner.Config.ConverterClass, org.aeonbits.owner.Config.DecryptorClass, org.aeonbits.owner.Config.DefaultValue, org.aeonbits.owner.Config.DisableableFeature, org.aeonbits.owner.Config.DisableFeature, org.aeonbits.owner.Config.EncryptedValue, org.aeonbits.owner.Config.HotReload, org.aeonbits.owner.Config.HotReloadType, org.aeonbits.owner.Config.Key, org.aeonbits.owner.Config.LoadPolicy, org.aeonbits.owner.Config.LoadType, org.aeonbits.owner.Config.PreprocessorClasses, org.aeonbits.owner.Config.Separator, org.aeonbits.owner.Config.Sources, org.aeonbits.owner.Config.TokenizerClass -
Method Summary
Modifier and TypeMethodDescriptionReturns comma-separated per-endpoint API p95 performance budgets in milliseconds.Returns comma-separated Playwright browser action p95 performance budgets in milliseconds.booleanReturns whether API p95 budget violations should fail the run instead of warning only.booleanReturns whether browser p95 budget violations should fail the run instead of warning only.booleanbooleanReturns comma-separated Playwright page-load p95 performance budgets in milliseconds.intport()default Performance.SetPropertyset()Returns a fluentEngineProperties.SetPropertybuilder that allows programmatic override of individual configuration properties at runtime.
-
Method Details
-
isEnabled
@Key("lightHouseExecution") @DefaultValue("false") boolean isEnabled() -
port
@Key("lightHouseExecution.port") @DefaultValue("8888") int port() -
isEnablePerformanceReport
@Key("generatePerformanceReport") @DefaultValue("true") boolean isEnablePerformanceReport() -
apiEndpointPerformanceBudgets
Returns comma-separated per-endpoint API p95 performance budgets in milliseconds.Use normalized endpoint names as report keys, for example
users=500,orders/{id}=750. Blank means no endpoint budgets are configured.- Returns:
- configured API endpoint budgets, or a blank string
-
failOnApiPerformanceBudgetViolation
@Key("failOnApiPerformanceBudgetViolation") @DefaultValue("false") boolean failOnApiPerformanceBudgetViolation()Returns whether API p95 budget violations should fail the run instead of warning only.- Returns:
truewhen budget violations should fail the run
-
browserActionPerformanceBudgets
Returns comma-separated Playwright browser action p95 performance budgets in milliseconds.Use metric names such as
playwright.element.click=750or*=1000to apply a default budget to every recorded browser action.- Returns:
- configured browser action budgets, or a blank string
-
pageLoadPerformanceBudgets
Returns comma-separated Playwright page-load p95 performance budgets in milliseconds.Use navigated URLs as keys, for example
https://example.com=3000, or*=3000to apply one default budget to every recorded page load.- Returns:
- configured page-load budgets, or a blank string
-
failOnBrowserPerformanceBudgetViolation
@Key("failOnBrowserPerformanceBudgetViolation") @DefaultValue("false") boolean failOnBrowserPerformanceBudgetViolation()Returns whether browser p95 budget violations should fail the run instead of warning only.- Returns:
truewhen browser budget violations should fail the run
-
set
Description copied from interface:EnginePropertiesReturns a fluentEngineProperties.SetPropertybuilder that allows programmatic override of individual configuration properties at runtime.- Specified by:
setin interfaceEngineProperties<Performance>- Returns:
- a new
EngineProperties.SetPropertyinstance for chaining property overrides
-