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 16 #include "base_stdtype.h" 17 namespace SysTuning { 18 namespace TraceStdtype { Size() const19size_t CacheBase::Size() const 20 { 21 return std::max(timeStamps_.size(), ids_.size()); 22 } IdsData() const23const std::deque<uint64_t> &CacheBase::IdsData() const 24 { 25 return ids_; 26 } TimeStampData() const27const std::deque<uint64_t> &CacheBase::TimeStampData() const 28 { 29 return timeStamps_; 30 } InternalTidsData() const31const std::deque<InternalTid> &CacheBase::InternalTidsData() const 32 { 33 return internalTids_; 34 } 35 DursData() const36const std::deque<uint64_t> &CpuCacheBase::DursData() const 37 { 38 return durs_; 39 } CpusData() const40const std::deque<uint32_t> &CpuCacheBase::CpusData() const 41 { 42 return cpus_; 43 } SetDur(uint64_t index,uint64_t dur)44void CpuCacheBase::SetDur(uint64_t index, uint64_t dur) 45 { 46 durs_[index] = dur; 47 } 48 } // namespace TraceStdtype 49 } // namespace SysTuning 50