Low commit activity in last 3 years
No release in over a year
danger plugin for asserting Swift compilation time.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.14
= 3.0.7
>= 0
>= 0
>= 0
>= 0

Runtime

 Project Readme

danger-xcprofiler

GitHub Action Gem Version

danger plugin for asserting Swift compilation time.

See detail for README of xcprofiler.

Installation

Add this line to your Gemfile:

gem 'danger-xcprofiler'

Usage

Just add this line to your Dangerfile:

xcprofiler.report 'MyApp'

Or specify an xcactivitylog path

logDir = Dir[File.join('DerivedData/Logs/Build/', '*.xcactivitylog')].first
xcprofiler.report nil, nil, logDir

If compilation times of each methods are exceeded the thresholds, danger adds inline comment to your PR.

Default thresholds is 50ms for warning, 100ms for failure.

If you want to change thresholds see the following:

# Defines inline_mode
xcprofiler.inline_mode = false
# Defines thresholds (ms)
xcprofiler.thresholds = {
  warn: 100,
  fail: 500
}
xcprofiler.report 'MyApp'

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.