Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display more information on negative avoidance message #186

Open
NikolayMetchev opened this issue Dec 20, 2021 · 5 comments
Open

Display more information on negative avoidance message #186

NikolayMetchev opened this issue Dec 20, 2021 · 5 comments

Comments

@NikolayMetchev
Copy link

It would be good when gradle doctor prints out which tasks took longer to be loaded from cache then a re-run would have taken for it to also print the time it thinks a re-run would have taken and how long loading from cache took.
I looked in the build scan and for the tasks that gradle doctor is pointing out gradle enterprise does not agree that loading from cache took longer.

@runningcode
Copy link
Owner

Thanks for bringing this up @NikolayMetchev . The way the time difference is measured is different between the Gradle Doctor and Gradle Enterprise. Neither value is 100% accurate. Nor is it possible for either calculation to account for potential differences in the environment between the build pulling form the build cache and the build that populated the build cache.

If you are seeing a lot of false positives, you can adjust the value for negativeAvoidanceThreshold to be higher than the default of 500ms.

The value that Gradle Doctor uses to estimate this value is the Build Cache entry's originExecutionTime and it compares that to the loading task's duration. Gradle Enterprise uses a different calculation for this.

@NikolayMetchev
Copy link
Author

Hi Nelson,
In its current form the message is not very helpful and requires a lot of investigation in order to determine if it’s even worth doing something about it. If there are two calculations then maybe you can display both with caveats.

As it is now I am just ignoring those messages as noise. If I were to have more info easily accessible perhaps I can make a more informed decision about adjusting the gradle doctor settings or the task configuration.

@hverlin
Copy link

hverlin commented Dec 1, 2022

@runningcode Do you know how Gradle Enterprise compute this? I am also seeing warnings from this plugin that don't seem to hold true compared to what I see in the Gradle enterprise UI.
It would be great if the plugin would show at least the delta, or how long it took for the original task to compute without the cache

@hverlin
Copy link

hverlin commented Dec 1, 2022

It appears that it should be possible to add the delta here, as well as the original build ID?

Would you accept a PR for this if this is possible?

@hverlin
Copy link

hverlin commented Dec 2, 2022

Something I have noticed is that probably Gradle enterprise ignore the fingerprinting inputs` duration, whereas Gradle doctor considers it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants