summaryrefslogtreecommitdiff
path: root/libs/androidfw/ResourceTimer.cpp
diff options
context:
space:
mode:
author Kohsuke Yatoh <kyatoh@google.com> 2022-07-28 21:51:41 +0000
committer Kohsuke Yatoh <kyatoh@google.com> 2022-07-28 21:58:17 +0000
commit3390cdcec3c24100bf4d3be3c5d2f9fb32486ed6 (patch)
tree410ad75ee69278956a42f0a4b90717935b6099a5 /libs/androidfw/ResourceTimer.cpp
parentb0c69df17c8c480c1c8df0e82c10277144af0a6e (diff)
Manually release objects in testDeserializeFontMap.
Before this CL, the latency numbers (esp. p90 and p95) are affected by the number of test iterations [1]. With more test iteration, stddev increases (instead of dropping). It is suspected that this is due to GC running during test to reclaim Typeface objects and release underlying native objects. The latency numbers are more stable [2] when we release the native objects manually outside measured segment. [1] testDeserializeFontMap before this CL on oriole ==== TARGET_TEST_DURATION_NS = 500ms ==== [1/1] android.graphics.perftests.TypefaceSerializationPerfTest#testDeserializeFontMap: PASSED (9.324s) testDeserializeFontMap_mean (ns): 183206 testDeserializeFontMap_median (ns): 180155 testDeserializeFontMap_percentile90 (ns): 209350 testDeserializeFontMap_percentile95 (ns): 213460 testDeserializeFontMap_stddev (ns): 41002 ==== TARGET_TEST_DURATION_NS = 5000ms ==== [1/1] android.graphics.perftests.TypefaceSerializationPerfTest#testDeserializeFontMap: PASSED (14.322s) testDeserializeFontMap_mean (ns): 202022 testDeserializeFontMap_median (ns): 190185 testDeserializeFontMap_percentile90 (ns): 240560 testDeserializeFontMap_percentile95 (ns): 253540 testDeserializeFontMap_stddev (ns): 93062 [2] testDeserializeFontMap with this CL on oriole ==== TARGET_TEST_DURATION_NS = 500ms ==== [1/1] android.graphics.perftests.TypefaceSerializationPerfTest#testDeserializeFontMap: PASSED (9.224s) testDeserializeFontMap_mean (ns): 121483 testDeserializeFontMap_median (ns): 118001 testDeserializeFontMap_percentile90 (ns): 122233 testDeserializeFontMap_percentile95 (ns): 125448 testDeserializeFontMap_stddev (ns): 51197 ==== TARGET_TEST_DURATION_NS = 5000ms ==== [1/1] android.graphics.perftests.TypefaceSerializationPerfTest#testDeserializeFontMap: PASSED (13.361s) testDeserializeFontMap_mean (ns): 120750 testDeserializeFontMap_median (ns): 119344 testDeserializeFontMap_percentile90 (ns): 124064 testDeserializeFontMap_percentile95 (ns): 127441 testDeserializeFontMap_stddev (ns): 15181 Bug: 239758440 Test: atest CorePerfTests:android.graphics.perftests.TypefaceSerializationPerfTest#testDeserializeFontMap Change-Id: Ia445300b1a872f51dadad38a0f063d5097c52779
Diffstat (limited to 'libs/androidfw/ResourceTimer.cpp')
0 files changed, 0 insertions, 0 deletions