diff options
author | Benjamin Schwartz <bsschwar@google.com> | 2019-08-21 16:30:55 -0700 |
---|---|---|
committer | Benjamin Schwartz <bsschwar@google.com> | 2019-09-13 15:59:29 -0700 |
commit | 37e62a1637370d1a1ed5d50d3fc897aae0e2a766 (patch) | |
tree | 3707b8b5ad953f413b63fce902a4f4182b84db0c /pwrstats_util/pwrstatsutil.proto | |
parent | b54dffd29e72e9973ede8ce890a36bb3b44b0638 (diff) | |
download | pixel-37e62a1637370d1a1ed5d50d3fc897aae0e2a766.tar.gz |
pwrstats_util: Generate statistics using protobuf
Bug: 138745474
Test: adb shell pwrstats_util
Change-Id: I2845d9b77c07d2df39017b983b370481a714d08d
Diffstat (limited to 'pwrstats_util/pwrstatsutil.proto')
-rw-r--r-- | pwrstats_util/pwrstatsutil.proto | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pwrstats_util/pwrstatsutil.proto b/pwrstats_util/pwrstatsutil.proto new file mode 100644 index 00000000..ee708a61 --- /dev/null +++ b/pwrstats_util/pwrstatsutil.proto @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2019 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. + */ +syntax = "proto3"; + +option java_package = "com.google.android.pwrstatsutil"; +package com.google.android.pwrstatsutil; + + +message PowerStatistic { + oneof power_stat { + StateResidency power_entity_state_residency = 1; + RailEnergy rail_energy = 2; + StateResidency c_state_residency = 3; + // add new power_stats here + } +} + +// Utility message for items that provide a state residency in milliseconds +message StateResidency { + message Residency { + string entity_name = 1; + string state_name = 2; + uint64 time_ms = 3; + } + + repeated Residency residency = 1; +} + +// Rail energy data in uWs +message RailEnergy { + message RailEntry { + string rail_name = 1; + uint64 energy_uws = 2; + } + + repeated RailEntry entry = 1; +} |