What s New in Energy Debugging

Similar documents
Writing Energy Efficient Apps

What s New in watchos

Working with Metal Overview

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

Managing Documents In Your ios Apps

Introducing On Demand Resources

Enabling Your App for CarPlay

Power, Performance, and Diagnostics

What s New in Xcode App Signing

Index. Dumisani Herman Nhlapo

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

DefDroid: Towards a More Defensive Mobile OS Against Disruptive App Behavior

Quick Interaction Techniques for watchos

Writing Energy Efficient Code

Profiling in Depth. Do you know where your code is? Session 412. Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer

Advances in TVMLKit. App Frameworks #WWDC17. Trevor Cortez, Localization Engineer Parry Panesar, tvos Engineer Jeremy Foo, tvos Engineer

CarPlay Navigation App Programming Guide. September 28, 2018

Implementing UI Designs in Interface Builder

Battery Power Saving Tips

Desktop Application Reference Guide For Windows and Mac

Using and Extending the Xcode Source Editor

Copyright

Amazfit Verge User Manual

HUAWEI MediaPad T1 8.0 FAQ HUAWEI TECHNOLOGIES CO., LTD. Issue 01. Date 06/30

Tips and Tricks: Designing low power Native and WebApps. Harita Chilukuri and Abhishek Dhanotia

Mastering Your iphone Session 1

1 Technical methodology

Hallo iphone Edition User Guide

Media and Gaming Accessibility

Designing for Apple Watch

Designing Great Apple Watch Experiences

DASH 4.5 user manual 1

Copyright

Extending Your Apps with SiriKit

Start Here BlackBerry Curve 9300 Series

Introducing Password AutoFill for Apps

A - ELECTRONIC SCORESHEET - CONNECTIVITY INFORMATION

Reduce Data Usage. 01 Cellular Data for Certain Apps Go to Settings > Cellular. Dad s iphone Tips Version: 1/1/2018 6:43:00 AM

Car Care Get diagnostics and insights about your car s health. Stay Connected Turn your car into a Wi-Fi hotspot for up to five devices.

File Cover. Arrange your Gallery into different folder names. (Move your Camera or

Advanced Debugging and the Address Sanitizer

Windows 7 Training for Developers

Under The Hood: Performance Tuning With Tizen. Ravi Sankar Guntur

What s New in Device Configuration, Deployment, and Management

What s New in Testing

Connected Car. Start Guide. Device by

AT&T Global Network Client for Android

The battery in a newly purchased phone has about 50% charge up.

BlackBerry BlackBerry 10 OS, version continues to build on the BlackBerry 10 platform for the Z10, Q10 and Z30 devices.

Monitoring and Managing the Network (Pharos Control)

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

A1. Technical methodology

What s New in SpriteKit

Diagnostics in Testing and Performance Engineering

Iphone Bluetooth Setup 4s How To Use Push. Notifications >>>CLICK HERE<<<

Quick Heal Mobile Security. Free protection for your Android phone against virus attacks, unwanted calls, and theft.

Writing Great Alerts. Design #WWDC17. Natalie Calvert, Designer

Mastering UIKit on tvos

Introducing the Modern WebKit API

Preface...3 Acknowledgments...4. Contents...5. List of Figures...17

Introduction. How it works

Version Release Date Description V First release. Change History V1.0.0 i

What Is React Native?

Infodraw MRS Server Web Administration Interface

What s New in Notifications

Manually Iphone 4 Update Ios 7 Problems After >>>CLICK HERE<<<

Quick Start Guide U.S. Cellular Customer Service

Copyright

ios vs Android By: Group 2

Lesson 5 Case Study: Connected RFIDs Supply Chain Monitoring Project. Chapter-12 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Is there anything I should bear in mind when pairing my

Copyright

What s New in Core Bluetooth

Can the app be installed on the device? Does the app behave as designed/desired if there is an incoming SMS?

NEO 4.5. User Manual

Smartphone Application User Manual

Android 5.1 operating system update for your

Creating Complications with ClockKit Session 209

Verify that Wi-Fi option is turned on. Swipe down from the top of the screen once by using two fingers, or twice using one finger. Tap > Wi-Fi.

WELCOME Mobile Applications Testing. Copyright

BT MobileXpress App V2 for Android Quick Guide

Integrating Apps and Content with AR Quick Look

New UIKit Support for International User Interfaces

GENERAL SET UP & APP. Swipe up and tap Restart.

AT&T Global Network Client for Android

App for freewifi hotspot straight talk iphone 5

Link to other configuration guides for information on...

Dell EMC OpenManage Mobile. Version User s Guide (ios)

Quick Heal Mobile Security. Free protection for your Android phone against virus attacks, unwanted calls, and theft.

Adapting to the New UI of OS X Yosemite

This user guide describes how to run the Atmel ATWINC3400 Bluetooth Low Energy (BLE) Provisioning demo from out-of-box conditions.

SMART RADIO MONITOR (SRM)

FAQ For IDOL 5S. SW: v4e1z+ul

How to Properly Program Your iphone or your ipad

viii. Bluetooth 36. How can I turn on Bluetooth and pair with another Bluetooth device?

INSITES CONNECT ADMINISTRATION GUIDE. Version 1.4.3


The TELUS Business Connect Mobile solution.

User Guide. Version 1.0.2

Introduction To Android

Transcription:

#WWDC18 What s New in Energy Debugging Phillip Azar, Apple/Battery Life David Choi, Apple/Battery Life 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Review general battery life concepts Review tools for energy debugging New features for energy debugging

Review general battery life concepts Review tools for energy debugging New features for energy debugging

What Is Energy?

What Is Energy? Power X Time

What Is Energy? Power Time

What Is Energy? Power Energy Time

What Is Energy? Power Energy Time

What Is Energy? App Active App Active Power Energy Time

What Is Energy? App Active App Active Power App Idle App Idle Energy Time

What Is Energy? App Active App Active Power App Idle App Idle App Suspended Energy Time

What Is Energy? Overhead Power Overhead Overhead Time

What Is Energy? App Active Your work App Active Power Time

What Is Energy? App Active Your work Overhead App Active Power Overhead Overhead Time

What Consumes Energy?

What Consumes Energy? Processing Networking Location Graphics

Processing

Processing The work horse

Processing The work horse Workload-dependent

Processing The work horse Workload-dependent More operations by your app = more energy

Networking

Networking Cellular, Wi-Fi, Bluetooth

Networking Cellular, Wi-Fi, Bluetooth Traffic-dependent

Networking Cellular, Wi-Fi, Bluetooth Traffic-dependent More network requests = more energy

Location

Location GPS, WiFi, Cellular

Location GPS, WiFi, Cellular Accuracy, frequency-dependent

Location GPS, WiFi, Cellular Accuracy, frequency-dependent More time spent tracking location = more energy

Graphics

Graphics Animations and UI

Graphics Animations and UI Complexity-dependent

Graphics Animations and UI Complexity-dependent More rendering = more energy

Processing Networking Location Graphics

Processing Networking Location Graphics More work = More energy

How Do We Optimize Energy Consumption?

Foreground

Foreground

Foreground Focus on providing value to the user

Foreground Focus on providing value to the user Do required work only

Example Media app feed

Example Media app feed Timer based feed refresh

Example Media app feed Timer based feed refresh

Feed Refresh Overhead Power Timer Timer Timer Time

Example Media app feed Timer based feed refresh

Example Media app feed Timer based feed refresh Feed refresh on demand Notification User interaction

Example Media app feed Timer based feed refresh Feed refresh on demand Notification User interaction

Feed Refresh Overhead Power User Interaction Notification Time

Foreground Focus on providing value to the user Do work when requested

Foreground Focus on providing value to the user Do work when requested Minimize complex UI

Example Video player app

Example Video player app

Example Video player app Persistent UI controls

Example Video player app Persistent UI controls

Example Video player app Persistent UI controls

Example Video player app Persistent UI controls Auto dismissed UI controls No user interaction Timeout based

Example Video player app Persistent UI controls Auto dismissed UI controls No user interaction Timeout based

Background

Background

Background Focus on minimizing workload

Background Focus on minimizing workload Coalesce tasks

Example App analytics

Example App analytics Sending immediately

Example App analytics Sending immediately

Analytics Overhead Power Background Background Background Time

Example App analytics Sending immediately

Example App analytics Sending immediately Sending deferred batches

Example App analytics Sending immediately Sending deferred batches

Analytics Overhead Power Background Time

Background Focus on minimizing workload Coalesce tasks

Background Focus on minimizing workload Coalesce tasks End tasks quickly

Example Background modes

Example Background modes Lettings tasks expire

Example Background modes Lettings tasks expire

Background Work Overhead Task Started Power Suspended Time

Example Background modes Lettings tasks expire

Example Background modes Lettings tasks expire Calling completion handlers UIBackgroundTask VoIP Etc

Example Background modes Lettings tasks expire Calling completion handlers UIBackgroundTask VoIP Etc

Background Work Overhead Task Started Completion Handler Power Time

Processing Networking Location Graphics

Processing Networking Location Graphics https://developer.apple.com/videos/play/wwdc2017/238/

Review general battery life concepts Review tools for energy debugging New features for energy debugging

Tools for Energy Debugging

Tools for Energy Debugging Energy Gauges

Tools for Energy Debugging Energy Gauges

Energy Gauges

Energy Gauges Are Great for

Energy Gauges Are Great for High level energy characterization Rapid profiling

Time Profiler

Other Profiling Templates and Instruments

Other Profiling Templates and Instruments Energy diagnostics profiling template Activity monitor profiling template Core animation profiling template GPU driver profiling template Location energy instrument Network profiling template

Instruments Are Great for

Instruments Are Great for Root cause analysis In depth profiling

Instruments Are Great for Root cause analysis In depth profiling Untethered profiling

Working Demo Energy Debugging

Working Demo Takeaways Energy Gauges for rapid iteration Instruments for root cause analysis Make energy a top priority

You ve shipped your app. Whats next?

NEW Review general battery life concepts Review tools for energy debugging New features for energy debugging

New Features for Energy Debugging David Choi, Battery Life

Now that You ve Shipped Your App How do you know if your customers are experiencing energy issues? How do you debug a customer energy issue?

A New Way of Debugging Energy Issues NEW Xcode Energy Logs Xcode Energy Organizer

Xcode Energy Logs NEW Reports high CPU energy events Points out energy hotspots in code Data from TestFlight and App Store

When Are Xcode Energy Logs Generated? NEW CPU % 80% High CPU Energy Events 80% CPU spin over 3 minutes in foreground Time 80% CPU spin over 1 minutes in background

When Are Xcode Energy Logs Generated? NEW CPU % 80% High CPU Energy Events 80% CPU spin over 3 minutes in foreground Time 80% CPU spin over 1 minutes in background Xcode Energy Log

Xcode Energy Logs: Impact on User Battery Life Up to 1% battery drop

Xcode Energy Logs: Impact on User Battery Life Up to 1% battery drop 8 minutes of talk time 6 minutes of browsing 30 minutes of music

What s in an Energy Log? Energy condition that triggered the report Device type and app build number Weighted call graph that shows energy hotspots

Xcode Energy Log: Weighted Call Graph

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() High CPU Energy Event detected!

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() method1() method2()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() method1() method3() method2() method4()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() main() method1() method3() method1() method2() method4()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() main() main() method1() method3() method1() method1() method2() method4() method2()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() main() main() main() method1() method3() method1() method1() method1() method2() method4() method2() method2()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() main() main() main() main() method1() method3() method1() method1() method1() method1() method2() method4() method2() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() main() main() main() main() main() main() method1() method3() method1() method1() method1() method1() method2() method4() method2() method2() method3()

Xcode Energy Log: Weighted Call Graph main() method1() method3() method1() method2() method4() method2() method3() 6 main() 5 method1() main() main() 3 method2() method1() method1() method3() 1 method3() method3() method2() method4() 1 method3() 1 method4()

Weighted Call Graph Collection of backtrace samples Aggregated by sample counts More samples mean heavily executed code 6 main() 5 method1() 3 method2() 1 method3() 1 method3() 1 method4()

How to Access Energy Logs?

Xcode Energy Organizer NEW

Xcode Energy Organizer NEW Test Flight and App Store ios apps

Xcode Energy Organizer NEW Test Flight and App Store ios apps Recent statistics

Xcode Energy Organizer NEW Test Flight and App Store ios apps Recent statistics List of top issues

Xcode Energy Organizer NEW Test Flight and App Store ios apps Recent statistics List of top issues Weighted call graph

Xcode Energy Organizer NEW Test Flight and App Store ios apps Recent statistics List of top issues Weighted call graph Page through logs

Xcode Energy Organizer NEW Test Flight and App Store ios apps Recent statistics List of top issues Weighted call graph Page through logs Open in Project

Demo Xcode Energy Organizer

Energy Organizer Demo takeaways Discover top energy issues from the field View energy hotspots with weighted call graphs Open in Project to debug code

Summary Think about energy use in design Use energy gauges and instruments Explore the new Xcode Energy Organizer

More Information https://developer.apple.com/go/?id=ios-energy-efficiency-guide https://developer.apple.com/videos/play/wwdc2017/238/ Power and Performance Lab Technology Lab 9 Friday 9:00AM