Giter Site home page Giter Site logo

sunyuchen / instruments-without-delay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/instruments-without-delay

0.0 2.0 0.0 298 KB

Changes Apple's Instruments tool to remove the 1 second delay in UIAHost.performTaskWithPathArgumentsTimeout

License: Other

Objective-C 84.28% C 6.99% Shell 5.24% JavaScript 3.49%

instruments-without-delay's Introduction

instruments-without-delay

instruments-without-delay fixes the 1-second delay problem when using UIAHost.performTaskWithPathArgumentsTimeout inside of Apple's Instruments / UIAutomation tool. performTaskWithPathArgumentsTimeout would normally take 1 second to respond regardless of how fast the task finishes.

If you're using Instruments to drive UI integration tests (e.g. with ios-driver), this hack can significantly speed up testing.

NOTE: For pre-Xcode 6, build from e4e474c7e9559bfc34724b3338c56b28b3390cd2 as Xcode 6 support introduced breaking changes.

Usage

Build and run the test:

./build.sh test

Under the build directory, you'll have a new instruments script. Use it in place of /usr/bin/instruments.

How it works

Instruments launches UIAutomation scripts in the iOS Simulator with a program called ScriptAgent. Actually, Instruments launches the iOS Simulator, which starts up the whole Simulator environment. Eventually, DTMobileIS is started up which finally starts launches ScriptAgent. ScriptAgent is what actually links UIAutomation.framework and runs the scripts, so we inject a library into ScriptAgent that swizzles out performTaskWithPathArgumentsTimeout with our own implementation that has no 1 second delay.

instruments-without-delay's People

Contributors

abhijit1234 avatar amyworrall avatar fpotter avatar mmmulani avatar

Watchers

 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.