xref: /aosp_15_r20/external/perfetto/docs/data-sources/android-game-intervention-list.md (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Android Game Intervention List
2
3_This data source is supported only on Android userdebug builds._
4
5The "android.game_interventions" data source gathers  the list of available game modes and game interventions of each game.
6
7This allows you to better compare between or document traces of the same game but under different game mode or with different game intervention.
8
9### UI
10
11At the UI level, game interventions are shown as a table in trace info page.
12
13![](/docs/images/android_game_interventions.png "Android game intervention list in the UI")
14
15### SQL
16
17At the SQL level, game interventions data is written in the following table:
18
19* [`android_game_intervention_list`](docs/analysis/sql-tables.autogen#android_game_intervention_list)
20
21Below is an example of querying what modes are supported (with interventions) and the current game mode of each game.
22
23```sql
24select package_name, current_mode, standard_mode_supported, performance_mode_supported, battery_mode_supported
25from android_game_intervention_list
26order by package_name
27```
28package_name | current_mode | standard_mode_supported | performance_mode_supported | battery_mode_supported
29-------------|--------------|-------------------------|---------------------------|-----------------------
30com.supercell.clashofclans | 1 | 1 | 0 | 1
31com.mobile.legends | 3 | 1 | 0 | 1
32com.riot.league.wildrift | 1 | 1 | 0 | 1
33
34### TraceConfig
35
36Android game intervention list is configured through [AndroidGameInterventionListConfig](/docs/reference/trace-config-proto.autogen#AndroidGameInterventionListConfig) section of trace config.
37
38Sample config:
39
40```protobuf
41data_sources: {
42    config {
43        name: "android.game_interventions"
44        android_game_intervention_list_config {
45            package_name_filter: "com.my.game1"
46            package_name_filter: "com.my.game2"
47        }
48    }
49}
50```
51