Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 12 of 12) sorted by relevance

/base/hiviewdfx/hiview/plugins/faultlogger/test/common/unittest/
Dfaultlogger_client_unittest.cpp87 std::atomic<int> counter{0}; variable
88 auto task = [](int32_t now, std::atomic<int>& counter) { in __anon211548e90102() argument
94 counter++; in __anon211548e90102()
101 task(now, std::ref(counter));
104 ASSERT_GT(counter, 0);
105 printf("Add %d logs.\n", counter.load());
/base/account/os_account/tools/acm/src/
Daccount_command.cpp94 int counter = 0; in RunAsCreateCommand() local
100 counter++; in RunAsCreateCommand()
106 if (counter == 1) { in RunAsCreateCommand()
164 int counter = 0; in RunAsDeleteCommand() local
169 counter++; in RunAsDeleteCommand()
175 if (counter == 1) { in RunAsDeleteCommand()
214 int counter = 0; in RunAsDumpCommand() local
219 counter++; in RunAsDumpCommand()
225 if (counter == 1) { in RunAsDumpCommand()
267 int counter = 0; in RunAsSetCommand() local
[all …]
/base/powermgr/battery_statistics/services/native/src/entities/
Dalarm_entity.cpp105 std::shared_ptr<StatsHelper::Counter> counter = nullptr; in GetOrCreateCounter() local
111 counter = alarmOnIter->second; in GetOrCreateCounter()
117 counter = alarmConuter; in GetOrCreateCounter()
124 return counter; in GetOrCreateCounter()
Dwifi_entity.cpp127 std::shared_ptr<StatsHelper::Counter> counter = nullptr; in GetOrCreateCounter() local
132 counter = wifiScanCounter_; in GetOrCreateCounter()
137 counter = wifiScanCounter_; in GetOrCreateCounter()
144 return counter; in GetOrCreateCounter()
/base/security/access_token/tools/accesstoken/src/
Datm_command.cpp116 int counter = 0; in RunAsDumpCommand() local
118 counter++; in RunAsDumpCommand()
125 if (counter == 1) { in RunAsDumpCommand()
153 int counter = 0; in RunAsPermCommand() local
155 counter++; in RunAsPermCommand()
162 if (counter == 1) { in RunAsPermCommand()
/base/hiviewdfx/hisysevent/frameworks/native/
Djson_flatten_parser.cpp164 int counter = 1; in ParseBrackets() local
168 ++counter; in ParseBrackets()
170 --counter; in ParseBrackets()
171 if (counter == 0) { in ParseBrackets()
/base/powermgr/battery_statistics/services/native/test/unittest/src/
Dstats_util_test.cpp228 std::shared_ptr<StatsHelper::Counter> counter = std::make_shared<StatsHelper::Counter>(); variable
231 counter->AddCount(addCount);
232 counter->AddCount(StatsUtils::DEFAULT_VALUE);
235 counter->AddCount(addCount);
237 activeCount = counter->GetCount();
240 counter->Reset();
241 activeCount = counter->GetCount();
/base/hiviewdfx/hiview/plugins/eventservice/
Dflat_json_parser.cpp183 int counter = 1; in ParseBrackets() local
187 ++counter; in ParseBrackets()
189 --counter; in ParseBrackets()
190 if (counter == 0) { in ParseBrackets()
/base/account/os_account/services/accountmgr/test/unittest/app_account/
Dapp_account_test.cpp492 …for (std::size_t counter = 1; counter <= Constants::APP_ACCOUNT_SUBSCRIBER_MAX_SIZE + 1; counter +… variable
497 if (counter <= Constants::APP_ACCOUNT_SUBSCRIBER_MAX_SIZE) {
499 EXPECT_EQ(appAccount_->eventListeners_.size(), counter);
502 EXPECT_EQ(appAccount_->eventListeners_.size(), counter - 1);
/base/startup/init/services/utils/
Dinit_utils.c258 int counter = 0; in SplitString() local
259 while ((counter < maxNum) && (dstPtr[counter] != NULL)) { in SplitString()
260 counter++; in SplitString()
261 if (counter >= maxNum) { in SplitString()
264 dstPtr[counter] = strtok_r(NULL, del, &buf); in SplitString()
266 return counter; in SplitString()
/base/powermgr/power_manager/services/native/src/
Drunning_lock_mgr.cpp294 std::shared_ptr<LockCounter> counter = iterator->second; in Lock() local
295 counter->Increase(remoteObj, lockInner); in Lock()
298 counter->GetCount()); in Lock()
328 std::shared_ptr<LockCounter> counter = iterator->second; in UnLock() local
329 counter->Decrease(remoteObj, lockInner); in UnLock()
332 counter->GetCount()); in UnLock()
364 std::shared_ptr<LockCounter> counter = iterator->second; in GetValidRunningLockNum() local
366 return counter->GetCount(); in GetValidRunningLockNum()
/base/powermgr/battery_statistics/services/native/src/
Dbattery_stats_core.cpp544 std::shared_ptr<StatsHelper::Counter> counter; in UpdateCounter() local
546 counter = entity->GetOrCreateCounter(statsType, uid); in UpdateCounter()
548 counter = entity->GetOrCreateCounter(statsType); in UpdateCounter()
551 if (counter == nullptr) { in UpdateCounter()
555 counter->AddCount(data); in UpdateCounter()