From 8f10a44b8d95cf06e5652bf346ae7a260ff4f771 Mon Sep 17 00:00:00 2001 From: miu Date: Mon, 4 Jan 2016 16:45:25 -0800 Subject: Optimizations to improve run times of cast_unittests. Overall, this change improved the total "--single-process-tests" run time from 14599 ms to 6958 ms on a high-performance developer desktop. This over-50% improvement should also carry over into sanitizer test runs, and help to alleviate test timeouts (e.g., on Dr Memory bots). I identified all individual tests that were running over 100 ms, and reduced their run-time by: 1. Reducing loop iterations to just the amount needed to appropriately test the implementation. 2. Reducing data volume by using smaller-sized VideoFrames in tests. 3. Optimizing media::cast::FakeSingleThreadTaskRunner, the task scheduler used by most of the tests. 4. Merging multiple end-to-end tests into a smaller set that still tests all the same end-to-end functionality. BUG=530842,487033 Review URL: https://codereview.chromium.org/1551063002 Cr-Commit-Position: refs/heads/master@{#367431} --- media/cast/logging/logging_defines.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'media/cast/logging') diff --git a/media/cast/logging/logging_defines.h b/media/cast/logging/logging_defines.h index 4780d84..455f85d 100644 --- a/media/cast/logging/logging_defines.h +++ b/media/cast/logging/logging_defines.h @@ -37,7 +37,9 @@ enum CastLoggingEvent { PACKET_RTX_REJECTED, // Receiver side packet events. PACKET_RECEIVED, - kNumOfLoggingEvents = PACKET_RECEIVED +}; +enum { + kNumOfLoggingEvents = PACKET_RECEIVED + 1, }; const char* CastLoggingToString(CastLoggingEvent event); -- cgit v1.1