instr
is a command line interface for profiling tools already installed in macOS. Under the hood uses dtrace
to get information from running processes.
dtrace
is pre-installed in macOS but in order to use it you have to disable System Integrity Protection. You can learn more about SIP from Apple Support page and make a conscious decision about disabling it in your system or your continuous integration environment.
instr
is distributed as a Ruby gem and can be installed using the following command:
$ gem install instrumentality
To get a feeling about what instr
can do, after disabling SIP and installing the gem try this:
$ instr profile file-activity Preferences --interactive
Now open System Preferences.app
. See the output? These are the files the application proccess tried to access.
instr
can be used to run any dtrace script you provide, but it also includes a few bundled. Learn how to integrate it in your projects using CocoaPods and how to use the included benchmark tool to measure performance as part of your delivery pipelines.
Bug reports and pull requests are welcome on GitHub at https://github.com/Ruenzuo/instrumentality.
The gem is available as open source under the terms of the MIT License.