Display hints when the glue packages are not efficiently configured#3151
Open
Display hints when the glue packages are not efficiently configured#3151
Conversation
added 5 commits
January 24, 2026 23:15
Contributor
Author
|
@mpkorstanje any suggestion on how to solve the semver issue ? |
Contributor
|
For now don't worry about it. |
mpkorstanje
reviewed
Jan 27, 2026
Contributor
mpkorstanje
left a comment
There was a problem hiding this comment.
Looks good.
- Please reduce the incidental details in
loadGlue. At a high level should read something like:
if options.isGlueHintEnabled():
if glueMetrics.expectedGains() > options.getGlueHintThreshold():
log.info(glueMetrics.performanceHintMessage())
A separate class might be needed to track the metrics and information. But that is okay.
- The changes to
BackendProviderServiceare breaking. But we can provide theOptionsby extracting a request object fromloadGlueand provide the options there. This would dovetail nicely into #3120. So for now just keepBackendProviderServiceas is.
added 3 commits
February 17, 2026 13:45
# Conflicts: # CHANGELOG.md # cucumber-core/src/main/java/io/cucumber/core/backend/Options.java # cucumber-core/src/main/java/io/cucumber/core/options/RuntimeOptions.java # cucumber-core/src/main/java/io/cucumber/core/options/RuntimeOptionsBuilder.java # cucumber-core/src/test/java/io/cucumber/core/runtime/ObjectFactoryServiceLoaderTest.java # cucumber-junit-platform-engine/src/main/java/io/cucumber/junit/platform/engine/CucumberConfiguration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
When the
JavaBackendloads many classes, but only a few steps/hooks, then we log an hint message to improve the situation.The hint message can suggest (when applicable and by decreasing efficiency):
This replaces the WARN message which occurs when the glue property is not configured.
Here is an example:
The behavior can be controlled through properties:
cucumber.glue.hint.enabled: determine if the hint is displayed or not (by default true)cucumber.glue.hint.threshold: the expected gain threshold in milliseconds (by default 100)⚡️ What's your motivation?
Helping the developer to configure Cucumber helps to get good performances.
Contributes to #3141.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Up to 10 classes are displayed in each hint category: the idea is to give an idea to the developer, not to be exhaustive.
The log message is displayed only if the expected gain is higher than 100 ms.
📋 Checklist: