Add new '--profile-as-json' option for outputing profile data in JSON


(Steffen Yount) #1

Hi All,

The ‘–profile’ flag on gradle is great. I’ve been using the data it outputs to programmatically validate that new patches don’t negatively impact our build times.

To get this working I find myself munging the HTML profile output from multiple invocations into JSON and then concatenating those results into a big JSON data file. At that point I can query the data file with Drill or whatever other no-sql tools I find useful to determine statistically relevant changes to my KPIs.

It would be really nice to have gradle just output the profile data as JSON directly so that I don’t have to munge the HTML output to get there.

I’ve submitted a pull request to add this functionality. I think it would be great to see this feature included in the next release:

Please let me know if you have questions, critiques, or comments.


(Benjamin Muschko) #2

Thanks for providing the pull request. I had look over the changes and would love to continue the discussion. Given that we are changing the code in Gradle core we should probably continue the discussion on the Gradle dev list. Would you mind opening a post over there? I definitely have some feedback I’d like to give.

Thanks, I am looking forward to digging into the details soon.


(Steffen Yount) #3

re-posted on the Gradle dev list.