MemWatcher
Helps you keep an eye on your RubyMotion iOS app's memory and CPU usage.
Adds a little UILabel in the top left of the screen that shows CPU % and memory usage in MB.
Setup/Usage
gem 'mem-watcher'
class AppDelegate
def application(app, didFinishLaunchingWithOptions: )
# ...
MemWatcher.watch
true
end
end
Options
The env:
option controls what environments MemWatcher will watch in. It defaults to "development"
and can be a string or array of acceptable RubyMotion environments.
MemWatcher.watch(env: [ "development", "test" ])
If you want to attach the view to another view, provide it:
MemWatcher.watch(parent_view: @my_other_view)
Caveats
- It only reports on the current app main process.
- I have no idea how accurate it is. It does accurately show memory leaks, from what I can see.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
MIT, yo.