pada: power-aware development assistant of mobile
TRANSCRIPT
PADA: Power-aware Development Assistantfor Mobile Sensing Applications
Chulhong Min1, Seungchul Lee1, Changhun Lee1, Youngki Lee2,Seungwoo Kang3, Seungpyo Choi1, Wonjung Kim1, Junehwa Song1
1KAIST, 2Singapore Management University, 3KOREATECH
UbiComp 2016
19 22
5
20s 30s 40s
Age
12
6
14
7 7
0-2 2-4 4-6 6-8 > 8
Development experiences (years)
13
23
10
Expert Intermediate Beginner
Self-reported Skill
61%
78%
Survey of 46 professional mobile developers
When do you start considering the energy efficiency?
No35%
After full impl.35%
Before full impl.
30%35% do not measure
35% measure after full implementation
How do you or your team measure the power? (Check all that apply)
8
31
15
5
1
9 8
40
21
# of
par
ticip
ants
QA Developer
Battery levelH/W usageobservation
Power monitor
I don’t know
No
Other
Rank the power cost ofscreen, GPS, storage, and accelerometer
25%
69%
6%
0% 10% 20% 30% 40% 50% 60% 70% 80%
Correct
Incorrect
I don't know
Key Takeaways
Mobile developers mostly
• Perceive the energy efficiency very important
• Often fail to consider the power
• Use inconvenient, inaccurate methods
• Have limited understanding on energy use
PADA: Power-aware Development Assistant for Mobile Sensing Applications
Facilitating REPETITIVE power evaluation
Supporting various REAL-LIFE situations
Providing ENRICHED power information
http://static6.businessinsider.com/image/554ce87e69bedd9438d97cdd-1200-924/happy-programmer-work.jpg
PADA Architecture
PADAfront end
Emulationmanager
Power emulatorPower emulatorPower emulatorPower emulator
Context-labeled sensor trace
App executables
Evaluation settings
Sensor Trace Collector
Power analyzer
APIs for power evalutation
Request
Power analysis result
Developer
Approach: Context-driven Record&Replay
App execution
H/W usage tracking
Sensor trace
Output: power
Record
Replay
Power Emulator
SensorManager
BT/WiFiManager
LocationManager
Sensing app
AlarmManager
PowerManager
sensor data
Kernel
Andr
oid
Fram
ewor
k
wake-up msg.
H/W Usage
Monitor
Sensor Emulator traceAccel.Accel. BT Wi-Fi GPS
PowerEstimator
Power Evaluation RequestWeb Demo: http://pada-web.github.io
Upload APK file
Select scenarios to test
Comparative AnalysisWeb Demo: http://pada-web.github.io
Location interval10sec? 20sec? 30sec?
<parameter.xml><parameter type=“location_interval”>
<value>10</value><value>20</value><value>30</value>
</parameter>
<application code>interval = PADA.getParameterValue(
“location_interval”, “parameter.xml”);requestLocation(GPS_PROVIDER, interval, 0, this);
Power-aware Implementation:Experimental Setup
Goal: implement iTrackwhile meeting power requirements
14 programmers
3 hour-longdevelopment
iTrack: energy-efficient location tracker
# Traces [minutes, context] Power requirements
1
Out
door [5, staying] DutyCPU ≤ 20%, # of BT/GPS calls = 0, …
2 [5, walking] # of BT calls = 1, # of GPS calls = 5, …
3 [3, walking], [2, staying] DutyACC ≤ 15%, # of alarm calls ≤ 50, …
4
Indo
or
[5, staying] DutyCPU ≤ 20%, # of BT/GPS calls = 0, …
5 [5, walking] TimeBT ≤ 120s, # of GPS calls = 0, …
6 [3, walking], [2, staying] DutyCPU ≤ 40%, # of BT calls = 3, …
Power-aware Implementation:Key Findings
Lowering burden of power evaluation
Repeatability of power evaluation
Logical bug detection
“While using PADA, I didn’t need to go out for testing GPS and I really liked it.” [P7]
Power-aware Implementation:Key Findings
Lowering burden of power evaluation
Repeatability of power evaluation
Logical bug detection
“When I saw the power report of my modified application, I realized that my modification was really bad. Without PADA, it could be harder to notice this mistake” [P9]
Power-aware Implementation:Key Findings
Lowering burden of power evaluation
Repeatability of power evaluation
Logical bug detection
Two alarm services for periodic sensing of accelerometer and Bluetooth with the same identifier [P12]
Power Tuning:Experimental Setup
SocioHotspot:Social hotspot tracker with BT scanning
Goal: tune SocioHotspot to balance energy efficiency and accuracy
5 programmers
select BT scan intervalwith/without PADA
Power Tuning without PADA:Key Findings
Inconsistency of daily behavior
Nontrivial burden
Limited result
“I tried to move around similar to yesterday, but it was practically infeasible.” [PB]
Power Tuning without PADA:Key Findings
Inconsistency of daily behavior
Nontrivial burden
Limited result
“It may need ten more days to find satisfactory values.” [PD]
Power Tuning without PADA:Key Findings
Inconsistency of daily behavior
Nontrivial burden
Limited result
0
20
40
60
80
100
0 0.25 0.5 0.75 1
expe
cted
bat
tery
life
(h)
F1 score
PA PB PC PD PE
Due to own intuition and limited trials
Conclusion
• Challenge of power-aware development for mobile sensing applications
• Repetitive power evaluation in real-life situations
• PADA: Power-aware development for mobile sensing applications
• Context-driven record-and-replay
• We show the usability of PADA with two developer studies