A console app for logging Xcode build times and presenting them in a notification right when the build finishes. Optionally the app can upload each log entry to a REST API endpoint accepting POST requests.
Based on BuildTimeAnalyzer-for-Xcode.
- Download BuildTimeLogger project, build and run it.
- Copy the product (BuildTimeLogger app) into some easily accessible location.
- In your Xcode project, edit scheme and add new Post-action in Build section:
If you want to upload each log entry to a remote endpoint just specify the URL as a param:
As in the example, I tested that it works with Firebase, but it can potentially send the data to any REST API endpoint accepting POST requests.
To see remotely stored results call the app (from terminal, outside the Xcode) with additional param:
$ /PATH/TO/BuildTimeLogger https://your-project-name.firebaseio.com/.json fetch
Example output:
Fetching remote data...
username: marcin.religa
build time today: 30m 26s
total build time: 165m 55s
username: test.user
build time today: 11m 23s
total build time: 45m 40s
This currently only works for results in JSON format fetched from Firebase. If you use different type of remote storage then you need to fetch/parse results yourself, as appriopriate.