blob: 2dc0cc7b4a6bfcda34a06e8172873b9c8e338880 [file] [log] [blame]
/*
* Copyright (C) 2017 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 = "proto2";
option optimize_for = LITE_RUNTIME;
package android.os.statsd;
option java_package = "com.android.os";
option java_outer_classname = "StatsLog";
import "frameworks/base/cmds/statsd/src/stats_events.proto";
message KeyValuePair {
optional int32 key = 1;
oneof value {
string value_str = 2;
int64 value_int = 3;
bool value_bool = 4;
float value_float = 5;
}
}
message EventMetricData {
optional int64 timestamp_nanos = 1;
optional StatsEvent stats_events = 2;
}
message CountBucketInfo {
optional int64 start_bucket_nanos = 1;
optional int64 end_bucket_nanos = 2;
optional int64 count = 3;
}
message CountMetricData {
repeated KeyValuePair dimension = 1;
repeated CountBucketInfo bucket_info = 2;
}
message StatsLogReport {
optional int32 metric_id = 1;
optional int64 start_report_nanos = 2;
optional int64 end_report_nanos = 3;
message EventMetricDataWrapper {
repeated EventMetricData data = 1;
}
message CountMetricDataWrapper {
repeated CountMetricData data = 1;
}
oneof data {
EventMetricDataWrapper event_metrics = 4;
CountMetricDataWrapper count_metrics = 5;
}
}