-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Instruments | ||
|
||
📖: [User Guide](https://help.apple.com/instruments/mac/current/) | ||
|
||
## Use | ||
|
||
Launch Instruments from the CLI: | ||
|
||
```sh | ||
open /Applications/Xcode.app/Contents/Applications/Instruments.app | ||
``` | ||
|
||
Profile with the Instruments CLI: | ||
|
||
```sh | ||
cd /Applications/Utilities | ||
instruments -t "Allocations" -D ~/trace_file_name.trace path/to/profiled/app | ||
``` | ||
|
||
## Options | ||
|
||
| Configuration option | Description | | ||
|----------------------|-------------| | ||
| `-t template` | The name or path of the profiling template to use when analyzing your app. | | ||
| `-s` | Returns a list of all installed profiling templates. | | ||
| `-D document` | The path where the .trace document should be saved. If the file already exists, the newly recorded data is appended to it as a new run. | | ||
| `-l #` | The amount of time to record, in milliseconds, before terminating. If not provided, recording occurs indefinitely, until the app is manually terminated. | | ||
| `-i #` | The index of the instrument to use for recording. | | ||
| `-p pid` | The process ID of the app to be recorded. | | ||
| `application` | The path of the app to be recorded. | | ||
| `-w hardware device` | The ID of the device to target. | | ||
| `-e variable value` | An environment variable to be applied while profiling. | | ||
| `argument` | A command-line argument to be passed to the app being profiled. Multiple arguments may be specified, if desired. | | ||
| `-v` | Enables verbose logging while profiling. | |