<> ||<>|| This page details power management measurement metrics for devices typically found in a mobile platform such as a phone or a tablet. This document captures hardware and software system components that can be measured along with possible strategies describing how to test. == Identify metrics useful for system power testing == Power Meter Measurements: === Idle === * Idle with screen on * Idle with screen off * Fully suspended with screen off === R/F signals === * Need to put device in Faraday cage * http://www.lessemf.com/ === GPS === * Off * On, getting a fix * On, tracking * Action: investigate GPS signal re-radiator into lab === Wifi === * Off * Associating * Time to associate * Power to associate * On + Idle * On + Not Associated * Receiving data * Sending data * data Send/Receive scenarios: * occasional UDP packets (e.g. every 60 seconds, every 5 seconds, every second) * streaming UDP data * streaming TCP/IP data === Touchscreen === * Idle * Being used (how to automate this?) === GSM / HSPA+ === * Off * On + Idle * Receiving data * Sending data * Receving SMS * Sending SMS * Phone call === BlueTooth === * Off * On + Idle * Set up discovery mode * Pairing + Bonding * Send/Receive data === GPU === * Off (?) * On + Idle * Playback video * Render 3D test === Camera === * Off * On * Take a photo * different resolutions * Take multiple photos * Record a video * different resolutions === Camera Flash/LED === * Off * On, flash * On, long duration === Screen Brightness === * Lowest * 25%, 50%, 75% * Highest * Nexus 4: /sys/devices/platform/msm_fb.525825/leds/lcd-backlight/brightness === Haptic Feedback === * Vibrate on/off === File System === * Maybe investigate best power saving fs, e.g. * Clean a partition and do: * format * fs populate * run known I/O sequences, bonnie++ or tiobench * dd write, dd read partion * dd write, dd read file system * Won't show up 'real world' usage though * Need to simulate real use cases. === USB === * lowpower modes? idle? * send/receive data * plug/unplug (automate?) * OTG host mode === CPU === * exercise scheduler: * N tasks, different loads on/off * cpu affinity * cpu scaling * voltate level scaling + freq scaling * powering off CPUs === Audio Output, Speaker === * off * idle? * playing PCM .wav data * different rates, 44.1 Hkz, etc * playing mp3 * different bit rates === Audio Output, Headphone jack === * not plugged in * plugged in idle * playing PCM .wav data * different rates, 44.1 Hkz, etc * playing mp3 * different bit rates === Audio Input === * off * on, idle(?) * on, recording == Sensors == === Gyro + Accellerometer === * Off, * On, Idle * On (Active) === Proximity Sensor === * Off * On, Idle * On, Sensing === Barometer === * Off * On, Idle * On, Sensing === Light Sensor === * Off * On, Idle * On, Sensing === Misc Tasks === * Identify hardware blocks + PM management in drivers * See [[https://wiki.ubuntu.com/Kernel/Dev/MobileDevicePM|MobileDevicePM]] == Other related measurements == === Wakeup events === * evenstat etc * long duration - check for occasional bursty events * long duration - check for continuous high freq events === General Activity === * idle wakeup event counting * idle irqs counting * idle system call counting e.g. "find busy poll()/select() CPU tasks" * CPU sucking processes * tools such as: top, htop, ps, vmstat, etc * GPU sucking processes === Context Switches === * Identify heavy or unnecessary context switches * vmstat like tool, maybe modify eventstat * pidstat -w 10 1 === Storage === * fatrace * look for busy open/close read/write tasks * fsync, sync * use ftrace, see [[http://kernel.ubuntu.com/git?p=cking/scripts.git;a=blob;f=mobile-instrumentation/sys_fsync/sys_fsync.sh;h=40c58e0e4916d981fad8ac816acac4ff17f43dbb;hb=2c423638420ec4239d2bda9de6c6aace5a24b2f8|sys_fsync.sh]]