blob: 594561d3d29438d4454f526cdd178f8cf4791f35 [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
Yao Chen2794da22017-12-13 16:01:55 -080019#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
yro00698da2017-09-15 10:06:40 -070020
Yang Lu3eba6212017-10-25 19:54:45 -070021#include <unordered_map>
22
Yao Chen44cf27c2017-09-14 22:32:50 -070023namespace android {
24namespace os {
25namespace statsd {
yro00698da2017-09-15 10:06:40 -070026
Yao Chen729093d2017-10-16 10:33:26 -070027#define DEFAULT_DIMENSION_KEY ""
Yao Chen729093d2017-10-16 10:33:26 -070028
29typedef std::string HashableDimensionKey;
30
Yao Chen5154a3792017-10-30 22:57:06 -070031typedef std::map<std::string, HashableDimensionKey> ConditionKey;
32
Yangster-mace2cd6d52017-11-09 20:38:30 -080033typedef std::unordered_map<HashableDimensionKey, int64_t> DimToValMap;
Yang Lu3eba6212017-10-25 19:54:45 -070034
Yao Chen729093d2017-10-16 10:33:26 -070035std::string getHashableKey(std::vector<KeyValuePair> key);
Yangster-mace2cd6d52017-11-09 20:38:30 -080036
Yao Chen44cf27c2017-09-14 22:32:50 -070037} // namespace statsd
38} // namespace os
39} // namespace android