GithubHelp home page GithubHelp logo

google / gtm_load_timer Goto Github PK

View Code? Open in Web Editor NEW
41.0 5.0 7.0 13 KB

A framework and instrument for timing Objective C +load messages.

License: Apache License 2.0

Python 15.11% Objective-C 84.89%
objective-c load instruments xcode google

gtm_load_timer's Introduction

gtm_load_timer

GTMLoadTimer is a framework to instrument Objective C +load calls to see how they are contributing to your application startup time.

How to use GTMLoadTimer

  1. Add a dependency on either the GTMLoadTimer-macOS or GTMLoadTimer-iOS framework to your project.
  2. Do a build and verify that the framework is copied into the Frameworks directory of your application bundle.
  3. Build the "Instrument" target of the GTMLoadTimer project.
  4. Go to the Finder and "open" the GTMLoadTimer.instrdst package you just built. It should ask to install into Instruments.
  5. Create a new "blank" instrument in Instruments and add the "+load messages" instrument.
  6. Record your app with your instrument.

The data that you are probably most interested in is the +load messages graph which will show you timings for each of the +load messages that the framework has swizzled. The "swizzler" track is just to make you aware of the overhead of using GTMLoadTimer.

Please do not ship GTMLoadTimer in your applications.

As far as I know there is nothing that GTMLoadTimer does that breaks any of Apple's rules with regards to the AppStore in that it only uses public APIs. That being said, all it will do is slow down launch time for your end users which is not cool.

What would be cool is if Apple built this functionality into libObjc directly so that GTMLoadTimer wasn't needed at all. If you feel the same, please file a radar to let Apple know you care. Feel free to reference my radar on this issue (47260318).

Level of support

This is not an officially supported Google product.

gtm_load_timer's People

Contributors

dmaclach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.