diff --git a/base/test/benchmarktest/event_benchmark_test/event_benchmark_test.cpp b/base/test/benchmarktest/event_benchmark_test/event_benchmark_test.cpp index 9a1bd3f8d1f799b3c94defc84c4c127cdca387f3..6bb558e332b466a162c93006eb9dcca2e934f746 100644 --- a/base/test/benchmarktest/event_benchmark_test/event_benchmark_test.cpp +++ b/base/test/benchmarktest/event_benchmark_test/event_benchmark_test.cpp @@ -357,8 +357,6 @@ bool TimerFdHandler::Initialize(uint32_t interval) newValue.it_interval.tv_nsec = (interval % MILLI_TO_BASE) * MILLI_TO_NANO; if (timerfd_settime(GetFd(), TFD_TIMER_ABSTIME, &newValue, nullptr) == INVALID_FD) { - BENCHMARK_LOGD("Set timerFd failed-%{public}s timer_fd:%{public}d, next_time:%{public}lld, "\ - "interval:%{public}lld", strerror(errno), GetFd(), newValue.it_value.tv_sec, newValue.it_interval.tv_sec); return false; } @@ -384,7 +382,7 @@ void TimerFdHandler::TimeOut() uint64_t expirations = 0; ssize_t n = ::read(GetFd(), &expirations, sizeof(expirations)); if (n != sizeof(expirations)) { - BENCHMARK_LOGD("reads %{public}d bytes instead of 8.", static_cast(n)); + BENCHMARK_LOGD("reads bytes not equal."); } if (timerCallback_) { @@ -848,8 +846,6 @@ uint32_t Timer::Register(const TimerCallback& callback, uint32_t interval /* ms uint32_t ret = ScheduleTimer(wrappedCb, interval, timerId, timerFd, once); if (ret != TIMER_ERR_OK) { - BENCHMARK_LOGD("||%{public}d||Try schedule task failed. timer-id:%{public}d, interval:%{public}d, "\ - "timer-fd:%{public}d", gettid(), timerId, interval, timerFd); return TIMER_ERR_DEAL_FAILED; } @@ -887,14 +883,10 @@ void Timer::Unregister(uint32_t timerId) std::lock_guard lock(mutex_); if (timerHandlers_.find(timerId) == timerHandlers_.end()) { - BENCHMARK_LOGD("||%{public}d||Unregister failed. timer-id:%{public}d not found.", gettid(), timerId); return; } auto entry = timerHandlers_[timerId]; - BENCHMARK_LOGD("||%{public}d||Try remove timer handler from reactor. timerId:%{public}d, interval:%{public}u", - gettid(), timerId, entry->interval_); - if (CancelTimer(entry) != TIMER_ERR_OK) { BENCHMARK_LOGD("||%{public}d||Unregister timer handler failed.", gettid()); } @@ -1000,10 +992,6 @@ ErrCode TimerEventHandler::Initialize() } if (timerfd_settime(handler_->GetFd(), TFD_TIMER_ABSTIME, &newValue, nullptr) == INVALID_FD) { - BENCHMARK_LOGD("||%{public}d||Set timer-fd failed. next:%{public}lld, interval:%{public}lld", - gettid(), static_cast(newValue.it_value.tv_sec), - static_cast(newValue.it_interval.tv_sec)); - return TIMER_ERR_DEAL_FAILED; } @@ -1049,8 +1037,7 @@ void TimerEventHandler::TimeOut() const size_t expirationSize = sizeof(expirations); ssize_t n = ::read(handler_->GetFd(), &expirations, expirationSize); if (n != expirationSize) { - BENCHMARK_LOGD("||%{public}d||Reads %{public}d bytes instead of %{public}d from timer fd.", - gettid(), static_cast(n), expirationSize); + BENCHMARK_LOGD("read bytes not equal"); } if (timerEventCallback_) { diff --git a/base/test/benchmarktest/mapped_benchmark_test/mapped_benchmark_test.cpp b/base/test/benchmarktest/mapped_benchmark_test/mapped_benchmark_test.cpp index afe48a01c1310b16d11734ac88afe3c424fa386a..0a579a299cc58ee0f640cccc8cb48b5f64c863a7 100644 --- a/base/test/benchmarktest/mapped_benchmark_test/mapped_benchmark_test.cpp +++ b/base/test/benchmarktest/mapped_benchmark_test/mapped_benchmark_test.cpp @@ -51,8 +51,6 @@ public: } else { BENCHMARK_LOGD("Create test dir Failed: %{public}s", dir.c_str()); } - - BENCHMARK_LOGD("Page size: %{public}lld", MappedFile::PageSize()); } void TearDown(const ::benchmark::State& state) override @@ -73,17 +71,11 @@ void PrintStatus(MappedFile& mf) BENCHMARK_LOGD("Mapped Region Start: %{public}p\n" "Mapped Region End: %{public}p\n" "View start: %{public}p\n" - "View End: %{public}p\n" - "View Size: %{public}lld\n" - "File Offset Start: %{public}lld\n" - "File Offset End: %{public}lld", + "View End: %{public}p", reinterpret_cast(mf.RegionStart()), reinterpret_cast(mf.RegionEnd()), reinterpret_cast(mf.Begin()), - reinterpret_cast(mf.End()), - mf.Size(), - mf.StartOffset(), - mf.EndOffset()); + reinterpret_cast(mf.End())); } bool CreateTestFile(const std::string& path, const std::string& content) diff --git a/base/test/benchmarktest/safe_queue_benchmark_test/safe_queue_benchmark_test.cpp b/base/test/benchmarktest/safe_queue_benchmark_test/safe_queue_benchmark_test.cpp index eccd810568745b15c8067fc7427ae153c328dc4f..3d6478f9af87db1257300171918cbeac798f239b 100644 --- a/base/test/benchmarktest/safe_queue_benchmark_test/safe_queue_benchmark_test.cpp +++ b/base/test/benchmarktest/safe_queue_benchmark_test/safe_queue_benchmark_test.cpp @@ -101,7 +101,6 @@ SafeQueue DemoThreadData::shareQueue; void PutHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clock::time_point absTime) { - BENCHMARK_LOGD("SafeQueue PutHandleThreadDataTime is called i:%{public}d .", i); std::this_thread::sleep_until(absTime); q.Put(i); @@ -109,7 +108,6 @@ void PutHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clock void GetHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clock::time_point absTime) { - BENCHMARK_LOGD("SafeQueue GetHandleThreadDataTime is called i:%{public}d.", i); std::this_thread::sleep_until(absTime); int t = 0; q.Get(t); @@ -117,7 +115,6 @@ void GetHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clock void EraseHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clock::time_point absTime) { - BENCHMARK_LOGD("SafeQueue EraseHandleThreadDataTime is called i:%{public}d.", i); std::this_thread::sleep_until(absTime); q.Erase(i); @@ -125,7 +122,6 @@ void EraseHandleThreadDataTime(DemoThreadData &q, int i, std::chrono::system_clo void EmptyHandleThreadDataTime(DemoThreadData &q, std::chrono::system_clock::time_point absTime) { - BENCHMARK_LOGD("SafeQueue EmptyHandleThreadDataTime is called."); std::this_thread::sleep_until(absTime); q.Empty(); @@ -184,7 +180,6 @@ public: unpushedIn++; } } - BENCHMARK_LOGD("SafeQueue GetThreadDatePushedStatus pIn:%{public}d upIn:%{public}d.", pushedIn, unpushedIn); } void GetThreadDateGetedStatus(unsigned int &getedOut, unsigned int &ungetedOut) @@ -199,7 +194,6 @@ public: ungetedOut++; } } - BENCHMARK_LOGD("SafeQueue GetThreadDateGetedStatus gOut:%{public}d uOut:%{public}d.", getedOut, ungetedOut); } void GetThreadDateEraseStatus(unsigned int &erase, unsigned int &unErase) @@ -213,7 +207,6 @@ public: unErase++; } } - BENCHMARK_LOGD("SafeQueue GetThreadDateEraseStatus erase:%{public}d unErase:%{public}d.", erase, unErase); } void GetThreadDateEmptyStatus(unsigned int &empty, unsigned int &unEmpty) @@ -227,12 +220,10 @@ public: unEmpty++; } } - BENCHMARK_LOGD("SafeQueue GetThreadDateEmptyStatus empty:%{public}d unEmpty:%{public}d.", empty, unEmpty); } void ResetStatus() { - BENCHMARK_LOGD("SafeQueue void ResetStatus is called."); for (auto &t : threads) { t.join(); }