| /* |
| * Copyright (C) 2021 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| // Partial clone of frameworks/proto_logging/stats/atoms.proto. CarTelemetryService only uses |
| // small number of atoms. |
| |
| syntax = "proto2"; |
| |
| package android.car.telemetry.statsd; |
| option java_package = "com.android.car.telemetry"; |
| option java_outer_classname = "AtomsProto"; |
| |
| message Atom { |
| oneof pushed { |
| ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
| AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
| } |
| |
| // Pulled events will start at field 10000. |
| oneof pulled { |
| ProcessMemoryState process_memory_state = 10013; |
| } |
| } |
| |
| message AppStartMemoryStateCaptured { |
| // The uid if available. -1 means not available. |
| optional int32 uid = 1; |
| optional string process_name = 2; |
| optional string activity_name = 3; |
| optional int64 page_fault = 4; |
| optional int64 page_major_fault = 5; |
| optional int64 rss_in_bytes = 6; |
| optional int64 cache_in_bytes = 7; |
| optional int64 swap_in_bytes = 8; |
| } |
| |
| message ProcessMemoryState { |
| optional int32 uid = 1; |
| optional string process_name = 2; |
| optional int32 oom_adj_score = 3; |
| optional int64 page_fault = 4; |
| optional int64 page_major_fault = 5; |
| optional int64 rss_in_bytes = 6; |
| optional int64 cache_in_bytes = 7; |
| optional int64 swap_in_bytes = 8; |
| } |
| |
| message ActivityForegroundStateChanged { |
| optional int32 uid = 1; |
| optional string pkg_name = 2; |
| optional string class_name = 3; |
| enum State { |
| BACKGROUND = 0; |
| FOREGROUND = 1; |
| } |
| optional State state = 4; |
| } |