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

Identifying the benchmark iteration from the build under test #589

Open
remcomokveld opened this issue Nov 20, 2024 · 4 comments
Open

Identifying the benchmark iteration from the build under test #589

remcomokveld opened this issue Nov 20, 2024 · 4 comments

Comments

@remcomokveld
Copy link

It would be nice to have access to org.gradle.profiler.BuildContext#getUniqueBuildId in some way from the gradle project that is being measured. Maybe through an environment variable or by adding a gradle/system property that the build can consume?

It would be helpful to be able to capture more per-build metrics without having to write custom profilers and using a custom fork of the gradle-profiler

@gabrielfeo
Copy link
Member

I'm not sure I understand your use case, but you may be able to achieve what you want with the existing org.gradle.profiler.* system properties that are passed to the target build. Keep in mind that they're probably considered an internal implementation detail, rather than public API. Also, consider reading them in a way that doesn't invalidate configuration caching, if you enabled cache and you expect it to be hit in your benchmark.

@remcomokveld
Copy link
Author

The use case is that we use a build service which captures data during the build and write that to a file. After all scenarios are completed we'd like to archive those files and be able to tie them back to the individual runs.

These properties are indeed going to help with that, thanks! Would be nice if they could be considered public API

@remcomokveld
Copy link
Author

Yeah this was indeed what I needed, thansk @gabrielfeo!

If there's no intention of making this public then this issue can be closed

@Maf1459
Copy link

Maf1459 commented Dec 15, 2024

It would be nice to have access to org.gradle.profiler.BuildContext#getUniqueBuildId in some way from the gradle project that is being measured. Maybe through an environment variable or by adding a gradle/system property that the build can consume?

It would be helpful to be able to capture more per-build metrics without having to write custom profilers and using a custom fork of the gradle-profiler

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