From 10fcefc929c3f18f4b19dacc350da7515114c354 Mon Sep 17 00:00:00 2001 From: frank-huangran Date: Wed, 7 Aug 2024 18:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=99tracestreamertest-feat=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: frank-huangran --- .../test/unittest/filter/animation_filter_test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/trace_streamer/test/unittest/filter/animation_filter_test.cpp b/trace_streamer/test/unittest/filter/animation_filter_test.cpp index 085407b6..ed3f3fb7 100644 --- a/trace_streamer/test/unittest/filter/animation_filter_test.cpp +++ b/trace_streamer/test/unittest/filter/animation_filter_test.cpp @@ -76,6 +76,7 @@ HWTEST_F(AnimationFilterTest, InvalidCallStack, TestSize.Level1) TS_LOGI("test36-2"); TracePoint point; std::string validName("H:RSUniRender::Process:[WindowScene_xxx] (0, 0, 1344, 2772) Alpha: 1.00"); + std::string newValidName("H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_xxx] (0, 0, 1344, 2772) Alpha: 1.00"); std::string invalidName("H:RSUniRender::Process:[xxx] (0, 0, 1344, 2772) Alpha: 1.00"); const size_t CALLSTACK_SLICE_ID = 1; CallStack *callStackSlice = stream_.traceDataCache_->GetInternalSlicesData(); @@ -83,10 +84,12 @@ HWTEST_F(AnimationFilterTest, InvalidCallStack, TestSize.Level1) stream_.traceDataCache_->GetDataIndex("H:RSMainThread::DoComposition"), stream_.traceDataCache_->GetDataIndex("H:ProcessDisplayRenderNode[0](0,0,0,0)"), stream_.traceDataCache_->GetDataIndex(validName), + stream_.traceDataCache_->GetDataIndex(newValidName), stream_.traceDataCache_->GetDataIndex(invalidName), }; std::vector funcPrefixs{ "H:RSUniRender::Process:[WindowScene_xxx]", + "H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_xxx]", "H:RSUniRender::Process:[xxx]", }; // invalid parentId @@ -111,7 +114,7 @@ HWTEST_F(AnimationFilterTest, InvalidCallStack, TestSize.Level1) INVALID_UINT64, callStackNames[i], depth}; index = callStackSlice->AppendInternalSlice(callStackInternalRow1, parentId); } - point.funcPrefix_ = funcPrefixs[1]; + point.funcPrefix_ = funcPrefixs[2]; point.name_ = invalidName; auto curStackRow = 1; auto res = stream_.streamFilters_->animationFilter_->BeginDynamicFrameEvent(point, curStackRow); @@ -122,6 +125,11 @@ HWTEST_F(AnimationFilterTest, InvalidCallStack, TestSize.Level1) curStackRow = 2; res = stream_.streamFilters_->animationFilter_->BeginDynamicFrameEvent(point, curStackRow); EXPECT_TRUE(res); + point.funcPrefix_ = funcPrefixs[1]; + point.name_ = newValidName; + curStackRow = 3; + res = stream_.streamFilters_->animationFilter_->BeginDynamicFrameEvent(point, curStackRow); + EXPECT_TRUE(res); } /** @@ -228,6 +236,7 @@ HWTEST_F(AnimationFilterTest, UpdateDynamicFrameInfo, TestSize.Level1) stream_.traceDataCache_->GetDataIndex("H:ProcessDisplayRenderNode[0](0,0,0,0)"), stream_.traceDataCache_->GetDataIndex( "H:RSUniRender::Process:[WindowScene_xxx] (0, 0, 1344, 2772) Alpha: 1.00"), + }; std::string funcPrefix("H:RSUniRender::Process:[WindowScene_xxx]"); uint64_t index = INVALID_UINT64; -- Gitee