gradle-circle-style
gradle-circle-style copied to clipboard
[FR] Automatically capture reports from ./gradlew --profile on CI
Running ./gradlew --profile <task>
locally is a super helpful way to diagnose slowness, but it seems to always output the nice HTML report to the build/reports/profile
directory.
I'd like to add --profile
to all my tasks on CI because profiling is pretty cheap and it's interesting to be able to click through and see whether there's low-hanging fruit. Currently, I'd need to add a bunch of nasty lines of bash to copy these reports into the $CIRCLE_ARTIFACTS
directory.
As an alternative, what do you think about making this gradle plugin detect the --profile
flag and add it's own version of the ReportGeneratingProfileListener
which writes to the $CIRCLE_ARTIFACTS
directory?
Sounds cheap and smart. Definitely within the scope of this plugin. Only problem is develop is stuck on a blocked feature. Base your PR off the 1.x branch and I'll fix that independently.
Cool, can't promise a PR soon but glad you think this repo could be a good home for this feature :)
I would expect you to be able to configure the target directory with a single line of Gradle by the way, definitely check to see if that's possible before sinking time into the listener route (assuming you haven't already search and hit a blank).
Yeah I was really hoping there would be a one-liner to do that too, but my googling skills are apparently not good enough (and as far as I can tell, the build/reports/profile
directory isn't configurable)
You just catapulted past the bar for becoming an admin on this repository, holy cow.