App Insight Mobile App Performance Monitoring In The
App. Insight: Mobile App Performance Monitoring In The Wild Lenin Ravindranath, Jitu Padhye, Sharad Agarwal, Ratul Mahajan, Ian Obermiller, Shahin Shayandeh There’s an App for that But its slow Critical Path Developer Feedback App Analysis Server Instrumented Downloads App Store Ø Diverse environmental conditions - Network Connectivity, GPS Signal quality Ø Variety of hardware and OS versions Ø Wide range of user interactions Ø Highly Asynchronous Programming Pattern Ø Instrumentation impacts app performance - They are already slow enough!!! Ø Limited Resources - Network, Battery, Memory What is the user-perceived delay? Where is the bottleneck? Options today • Little platform support • Only option is to instrument your app – Manage your own logging infrastructure Twitter Callback Process Tweets Facebook Callback Background Thread Fire Process Posts Fire Download. Callback(tweets) { rating = Process. Tweets(tweets); UIDispatch(Display. Rating, rating); } Display. Rating(rating) { display. Text = rating; } UI Thread Wakeup Display Ø Automatic App Instrumentation - Zero Developer Effort - Binary Instrumentation Ø Readily Deployable - No changes to the OS or runtime Ø Low overhead UI Manipulation Thread Execution Async Calls and Callbacks UI Updates Thread Synchronization Detour Callbacks System App Async. Http. Get obj. Detour. Callback Async Call Match. Id = 3 Case Studies Download. Callback(response) { } Match. Id = 3 obj = new Detour. Object(Get. Callback, Match. Id++); Async. Http. Get(url, obj. Detour. Callback); class { } UI Dispatch UI Thread UI Event Handler End User Manipulation User Perceived Delay My app Problem Action/Notes - Replayed transaction - Exception path information with the same URL included http call with URL - Fixed a bug Crash Known Less Info UI hog - Aggregate analysis showed compute variability Unknown - Abnormal latencies only at the start of a session Match. Id = 3 My app App. Insight Slow - Serial Network Transfers in - Now parallelized with Unknown Transaction the Critical Path faster response times Detour. Object Detour. Callback(response) { Download. Callback(response); } Before My app Frequently interrupted Wasted Unknown transaction did not Computation terminate Popular App Slow but no Transactions data Known Aggregate analysis showed 3 G latencies significantly affecting critical paths Slow Custom instrumentation in Unknown Transactions critical path - System loading DLL in the critical path - Fixed by force loading DLLs at the start - Wasting compute - Problem fixed Quantitative data to back up their decision for caching Reason why App. Insight is needed! Aggregate Analysis Process Download Delay UI Event Handler Start App Business App Background Thread Async Get Call User Manipulation Capture User Transaction App. Insight Thread. Start() Developer Feedback Significant barrier for most app developers Download Callback parse. XML() … … Download. Callback() Async. Http. Get(url) Click. Handler() Asynchronous Code Click. Handler() { Async. Http. Get(url, Download. Callback); } Stack trace Background Thread Ø Ø Ø at parse. XML() Thread. Callback() Facebook Twitter Thread Blocked Exception Background Thread User Click App Instrumentation is Challenging In the wild monitoring important Background Thread UI Thread Performance problems are inevitable in the wild Hard to emulate in the lab Download. Callback() App Traces “… Too slow - killing the usefulness when you really need to go. ” Optimizing the critical path reduces the user perceived delay Developer Instrumenter Exception Path UI update Ø Outliers - Point to corner cases Ø Highlight common critical paths - Focus development effort Ø Root causes of Performance Variability - Highlight what really matters in the wild Overhead Compute Memory Network Binary Size Battery 0. 02% 2% 4% 1. 2% <1%
- Slides: 1