Skip to content

krlvi/selfprofiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SelfProfiler

SelfProfiler is a script that samples the currently active window, streaming Trace Event Format events containing the frontmost application name and window title to standard out.

If the output is piped into a file it can be read by the Google Chrome Trace Event Profiling Tool.

Currently only OSX is supported via the Accessability APIs.

Usage

The terminal will require access to OSX Accessability, which is enabled via System Preferences -> Security & Privacy -> Privacy -> Accessibility where you can add the terminal emulator that you use.

$ ./selfprofiler.sh > prof.json

In Google Chrome navigate to about://tracing and load prof.json.

If you want to resume a started session you can use the --resume flag.

$ ./selfprofiler.sh --resume >> prof.json

Example

Here is an example profiling output which when loaded in Google Chrome's Trace Event Profiling Tool looks as follows:

Trace Event Profiling Tool Screenshot

Contributing

Pull requests are welcome :)

License

Copyright © 2019 Kiril Videlov

Distributed under the Eclipse Public License.

About

Like software profiling, but for humans

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages