Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Continuous Profiling for
Android Game Performance Optimization
KLab Inc.
Yoshio Hanawa
Software Engineer
KLab Inc.
Suguru ...
About us
KLab is a Mobile gaming
company in Japan.
We have a number of games available globally
based on Japanese IPs.
Profiling on Mobile Is Painful
● No dedicated debug hardware
● Many different devices / profilers
● Troublesome to set up ...
Our Solution : Continuous Profiling
● Automatic profiling integrated with CI/CD
● Non-engineers can view the analysis resu...
KLab Inc.
Part 1: How to Profile the Application
Scripting allows the Unity player to save profiling data in-device as a Binary Log ...
Summarizing Profiling Data
● We developed a Converter with Unity Technologies Japan.
● It summarize results for each Unity...
Changes to the Application for Profiling
1. Automatic app play
○ It is necessary for automatic profiling.
○ Execute a fixe...
Part 2. Auto Profiling System
KLab Inc.
We can build an APK package by sending a command to a bot on Slack.
The profiling system starts automatically when the APK...
● Python script
● AAPT (Android Asset Packaging Tool)
○ Detect Bundle ID
○ Detect main activity name
● ADB (Android Debug ...
● Error recovery
○ Wait and retry loop is better
○ Reset ADB server (by kill-server, start-server)
○ Difference between de...
Part 3. Dashboard System
KLab Inc.
● Services on GCP
○ Cloud Storage + Cloud Functions
■ Storing and Processing data from Android
○ BigQuery
■ Data storage f...
● Pros
○ Lower cost than RDB
○ Almost constant performance for massive data
○ Supported by popular business intelligence t...
● Pros
○ Free BI tool (Thanks Google!)
○ Provides access control with Google account
● Cons
○ Limited chart type and custo...
Top page shows
summary of multiple profiling
Dashboard Screen
KLab Inc.
Click on the drilldown link on
the top page to go this page.
● By Category
○ Breakdown pie chart
○ Checking upper limit
● ...
Performance Improvement Due To Optimization
KLab Inc.
● Profile and show other performance indices
○ Memory consumption
○ GPU
○ Network I/O
○ Etc.
● More stability and usabilit...
We developed a fully-automated profiling system for Android games.
Freed from painful manual profiling tasks
Non-engineer ...
Thank You
KLab Inc.
Upcoming SlideShare
Loading in …5
×

3

Share

Download to read offline

Continuous Profiling for Android Game Performance Optimization

Download to read offline

GDC2019

「Continuous Profiling for Android Game Performance Optimization」

Sho Hosoda
Suguru Oho
Yoshio Hanawa

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Continuous Profiling for Android Game Performance Optimization

  1. 1. Continuous Profiling for Android Game Performance Optimization KLab Inc. Yoshio Hanawa Software Engineer KLab Inc. Suguru Oho Software Engineer KLab Inc. Sho Hosoda Unity Engineer KLab Inc. KLab Inc.
  2. 2. About us KLab is a Mobile gaming company in Japan. We have a number of games available globally based on Japanese IPs.
  3. 3. Profiling on Mobile Is Painful ● No dedicated debug hardware ● Many different devices / profilers ● Troublesome to set up correctly ● Not easy for non-engineers So we profiled on only a few devices for a limited set of cases... Too late to notice performance degradation  KLab Inc.
  4. 4. Our Solution : Continuous Profiling ● Automatic profiling integrated with CI/CD ● Non-engineers can view the analysis results on the dashboard We can detect performance degradation sooner and start optimizing the bottlenecks immediately KLab Inc.
  5. 5. KLab Inc.
  6. 6. Part 1: How to Profile the Application Scripting allows the Unity player to save profiling data in-device as a Binary Log file. We can load and view this file in the Unity Editor using the Profiler window. // Saves profiling data Profiler.logFile = "mylog"; Profiler.enableBinaryLog = true; Profiler.enabled = true; Viewing binary log using Unity Profiler window KLab Inc.
  7. 7. Summarizing Profiling Data ● We developed a Converter with Unity Technologies Japan. ● It summarize results for each Unity’s CPU main thread method. ○ processing time ( average / sum / min / max ) ○ number of calls ○ call stack Convert Binary Log CSV KLab Inc.
  8. 8. Changes to the Application for Profiling 1. Automatic app play ○ It is necessary for automatic profiling. ○ Execute a fixed scenario, such as the transition to the target scene. 2. Control start and end of profiling ○ We want to profile only the target scene. 3. Save JSON for meta information ○ Unity Version / Platform / Device Model / Scene Name / etc... KLab Inc.
  9. 9. Part 2. Auto Profiling System KLab Inc.
  10. 10. We can build an APK package by sending a command to a bot on Slack. The profiling system starts automatically when the APK build is complete. The team members don’t need to be aware of the profiling. Build System Integration KLab Inc.
  11. 11. ● Python script ● AAPT (Android Asset Packaging Tool) ○ Detect Bundle ID ○ Detect main activity name ● ADB (Android Debug Bridge) ○ Install apk ○ Run application ○ Uninstall, file transfer and cleanup ● Unity (Execute convert script) Auto-Profiling System KLab Inc.
  12. 12. ● Error recovery ○ Wait and retry loop is better ○ Reset ADB server (by kill-server, start-server) ○ Difference between devices and OS version ● Keep device condition clean ○ Use some ADB subcommands ■ Kill: process kill ■ Kill-all: kill all background processes ■ Pm clear: clear all data related packages ○ Wait for cooling ● Device Settings ○ Developer mode ○ “Stay awake” & Select MTP Difficulty with REAL devices KLab Inc.
  13. 13. Part 3. Dashboard System KLab Inc.
  14. 14. ● Services on GCP ○ Cloud Storage + Cloud Functions ■ Storing and Processing data from Android ○ BigQuery ■ Data storage for dashboard ● Google Data Studio ○ Sharing visualized analytics for team members Dashboard System Components KLab Inc.
  15. 15. ● Pros ○ Lower cost than RDB ○ Almost constant performance for massive data ○ Supported by popular business intelligence tools ● Cons ○ Slower query than RDB (1-10 sec) ○ Append-only storage by design Suitable for data analytics even if not "big data." Pros & Cons of BigQuery KLab Inc.
  16. 16. ● Pros ○ Free BI tool (Thanks Google!) ○ Provides access control with Google account ● Cons ○ Limited chart type and customizability Good enough for our dashboard Pros & Cons of Data Studio KLab Inc.
  17. 17. Top page shows summary of multiple profiling Dashboard Screen KLab Inc.
  18. 18. Click on the drilldown link on the top page to go this page. ● By Category ○ Breakdown pie chart ○ Checking upper limit ● By Method ○ Average frame timing [ms] etc... Detailed Report KLab Inc.
  19. 19. Performance Improvement Due To Optimization KLab Inc.
  20. 20. ● Profile and show other performance indices ○ Memory consumption ○ GPU ○ Network I/O ○ Etc. ● More stability and usability ○ Monitoring auto-profiling system ○ Web interface for controlling auto-profiling system Future works KLab Inc.
  21. 21. We developed a fully-automated profiling system for Android games. Freed from painful manual profiling tasks Non-engineer friendly system As a result We can detect bottlenecks in our games. The iteration of performance optimization becomes faster. Conclusion KLab Inc.
  22. 22. Thank You KLab Inc.
  • jmzspr

    Jan. 8, 2020
  • GlassesRed

    Jan. 8, 2020
  • GlassesRed

    Jan. 8, 2020

GDC2019 「Continuous Profiling for Android Game Performance Optimization」 Sho Hosoda Suguru Oho Yoshio Hanawa

Views

Total views

916

On Slideshare

0

From embeds

0

Number of embeds

33

Actions

Downloads

2

Shares

0

Comments

0

Likes

3

×