diff options
author | Riddle Hsu <riddlehsu@google.com> | 2021-03-18 11:55:07 +0800 |
---|---|---|
committer | Riddle Hsu <riddlehsu@google.com> | 2021-03-18 11:55:07 +0800 |
commit | fe9c5a5c461c96b1fd61f3fdd8fd0a511531b45e (patch) | |
tree | 0a0e96fba5140a8df3c1c3989b93290ddca3d766 /apct-tests/perftests | |
parent | f093138549796277487ff5a545a567f3c64701ff (diff) |
Skip reporting stats without enough samples
Otherwise android.perftests.utils.Stats will reject the data
and make the test fail.
Also correct a typo.
Bug: 182962701
Test: atest InternalWindowOperationPerfTest
Change-Id: I1d097f0de9a632b02d204509729f1671327285e4
Diffstat (limited to 'apct-tests/perftests')
-rw-r--r-- | apct-tests/perftests/windowmanager/src/android/wm/InternalWindowOperationPerfTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apct-tests/perftests/windowmanager/src/android/wm/InternalWindowOperationPerfTest.java b/apct-tests/perftests/windowmanager/src/android/wm/InternalWindowOperationPerfTest.java index bccef533be32..3a114173869a 100644 --- a/apct-tests/perftests/windowmanager/src/android/wm/InternalWindowOperationPerfTest.java +++ b/apct-tests/perftests/windowmanager/src/android/wm/InternalWindowOperationPerfTest.java @@ -53,7 +53,7 @@ public class InternalWindowOperationPerfTest extends WindowManagerPerfTestBase "applyPostLayoutPolicy", "applySurfaceChanges", "AppTransitionReady", - "closeSurfaceTransactiom", + "closeSurfaceTransaction", "openSurfaceTransaction", "performLayout", "performSurfacePlacement", @@ -98,6 +98,10 @@ public class InternalWindowOperationPerfTest extends WindowManagerPerfTestBase } mTraceMarkParser.forAllSlices((key, slices) -> { + if (slices.size() < 2) { + Log.w(TAG, "No sufficient samples: " + key); + return; + } for (TraceMarkSlice slice : slices) { state.addExtraResult(key, (long) (slice.getDurationInSeconds() * NANOS_PER_S)); } |