blob: e46b8ebe002138cd6acfca8d461b6b2feb273f8f [file] [log] [blame]
yro00698da2017-09-15 10:06:40 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Yang Lu3eba6212017-10-25 19:54:45 -070016
17#pragma once
yro00698da2017-09-15 10:06:40 -070018
Chenjie Yud9dfda72017-12-11 17:41:20 -080019#include <sstream>
Yao Chend5aa01b32017-12-19 16:46:36 -080020#include "HashableDimensionKey.h"
21#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
Chenjie Yud9dfda72017-12-11 17:41:20 -080022#include "logd/LogReader.h"
yro00698da2017-09-15 10:06:40 -070023
Yang Lu3eba6212017-10-25 19:54:45 -070024#include <unordered_map>
25
Yao Chen44cf27c2017-09-14 22:32:50 -070026namespace android {
27namespace os {
28namespace statsd {
yro00698da2017-09-15 10:06:40 -070029
Yangster-mac20877162017-12-22 17:19:39 -080030const HashableDimensionKey DEFAULT_DIMENSION_KEY = HashableDimensionKey();
Yao Chen729093d2017-10-16 10:33:26 -070031
Chenjie Yu85ed8382017-12-14 16:48:54 -080032// Minimum bucket size in seconds
33const long kMinBucketSizeSec = 5 * 60;
34
Yangster-mac20877162017-12-22 17:19:39 -080035typedef std::map<std::string, std::vector<HashableDimensionKey>> ConditionKey;
Yao Chen5154a372017-10-30 22:57:06 -070036
Yangster-mace2cd6d52017-11-09 20:38:30 -080037typedef std::unordered_map<HashableDimensionKey, int64_t> DimToValMap;
Yang Lu3eba6212017-10-25 19:54:45 -070038
Yao Chen44cf27c2017-09-14 22:32:50 -070039} // namespace statsd
40} // namespace os
41} // namespace android