1 /* 2 * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. 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 #include "hilog_stdtype.h" 16 17 namespace SysTuning { 18 namespace TraceStdtype { AppendNewLogInfo(const LogInfoRow & logInfoRow)19size_t LogInfo::AppendNewLogInfo(const LogInfoRow &logInfoRow) 20 { 21 hilogLineSeqs_.emplace_back(logInfoRow.seq); 22 timeStamps_.emplace_back(logInfoRow.timeStamp); 23 pids_.emplace_back(logInfoRow.pid); 24 tids_.emplace_back(logInfoRow.tid); 25 levels_.emplace_back(logInfoRow.level); 26 tags_.emplace_back(logInfoRow.tag); 27 contexts_.emplace_back(logInfoRow.context); 28 originTs_.emplace_back(logInfoRow.originTs); 29 return Size() - 1; 30 } HilogLineSeqs() const31const std::deque<uint64_t> &LogInfo::HilogLineSeqs() const 32 { 33 return hilogLineSeqs_; 34 } Pids() const35const std::deque<uint32_t> &LogInfo::Pids() const 36 { 37 return pids_; 38 } Tids() const39const std::deque<uint32_t> &LogInfo::Tids() const 40 { 41 return tids_; 42 } Levels() const43const std::deque<DataIndex> &LogInfo::Levels() const 44 { 45 return levels_; 46 } Tags() const47const std::deque<DataIndex> &LogInfo::Tags() const 48 { 49 return tags_; 50 } Contexts() const51const std::deque<DataIndex> &LogInfo::Contexts() const 52 { 53 return contexts_; 54 } OriginTimeStamData() const55const std::deque<uint64_t> &LogInfo::OriginTimeStamData() const 56 { 57 return originTs_; 58 } 59 } // namespace TraceStdtype 60 } // namespace SysTuning 61