1 // Copyright (C) 2016 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto2"; 16 17 option optimize_for = LITE_RUNTIME; 18 19 message DataContainer { 20 repeated AppData app = 1; 21 repeated CpuData cpu = 2; 22 }; 23 24 message CpuData { 25 required int64 timestamp = 1; 26 required int64 uptime = 2; 27 required int64 utime = 3; 28 required int64 ntime = 4; 29 required int64 stime = 5; 30 required int64 itime = 6; 31 required int64 iowtime = 7; 32 required int64 irqtime = 9; 33 required int64 sirqtime = 10; 34 } 35 36 message AppData { 37 required int32 pid = 1; 38 required string tname = 2; 39 required string name = 3; 40 repeated AppSample samples = 4; 41 } 42 43 message AppSample { 44 required int64 timestamp = 1; 45 required int64 uptime = 2; 46 required int64 rchar = 3; 47 required int64 wchar = 4; 48 required int64 syscr = 5; 49 required int64 syscw = 6; 50 required int64 readbytes = 7; 51 required int64 writebytes = 8; 52 required int64 utime = 9; 53 required int64 stime = 10; 54 required int64 rss = 11; 55 }; 56