0.0
No commit activity in last 3 years
No release in over 3 years
use DTrace on motion
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0
 Project Readme

motion-dtrace

Proof of concept to use dtrace on rubymotion. Check the demo at You Tube.

Installation

gem install motion-dtrace

Usage

Edit the Rakefile of your RubyMotion project and add the following require line.

require 'rubygems'
require 'motion-dtrace'

Start simulator process:

rake

On another terminal, start dtrace:

rake dtrace

When you terminate the app, you get a trace similar to following:

                         CLASS#METHOD                          TOTAL TIME µsec
--------------------------------------------------------------------------------
                       CGPoint#y=:                             3
                        String#nil?                            3
                         Array#last                            4
                        CGRect#origin                          4
                Evernote::Note#title                           4
                          Hash#empty?                          4
                          ........
                         Class#all:                            19867
                       UIImage#thumbnail                       24226
                  DTWebArchive#thumbnail                       24415
                      ClipItem#thumbnail                       24451
                    __NSArrayM#each                            24717
          ClipperTableViewCell#item=:                          25143

Extra

You may specify your own dtrace file via:

rake dtrace DTRACE=/Users/siuying/Documents/workspace/motion/motion-dtrace/dtrace/methods_duration.d

TODO

Currently this gem is just a hack to simplify command lines.

We shall investigate can we do real integration with project.

Credit