blink image_decode_bench: use more Chromium stuff
This CL refactors image_decode_bench: - Rewrites function ReadFile() to use base::FilePath etc. - Configures the Logging and changes fprintf/stderr to LOG() statements, and exit()s into LOG_ASSERT(). - Names the constant kDefaultDecodeTimes. - s/DecodeError/PrintErrorAndExit/ to clarify what it does. - Changes uses of CurrentTimeTicks() with base::ElapsedTimer, and uses TimeDelta ISO double to count the elapsed time. - Uses perf_test::PrintResult to add info about the image (size and #pixels), when a new parameter (-v / -verbose) is specified after the current two parameters, file and #iterations; output is e.g.: *RESULT decode_time /usr/local/google/home/mcasas/Pictures/4.webp: 100 times 790528 pixels (1024x772)= 66.27827 ms/sample Bug: 889898 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ic0a66d2aa3d2f08b13c8af99aed31e61d7246dec Reviewed-on: https://chromium-review.googlesource.com/c/1225653 Commit-Queue: Miguel Casas <mcasas@chromium.org> Reviewed-by:Leon Scroggins <scroggo@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#598803}
Showing
Please register or sign in to comment