OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 627 |
628 // Stop all threads, removes the need for synchronization when analyzing | 628 // Stop all threads, removes the need for synchronization when analyzing |
629 // the data. | 629 // the data. |
630 cast_environment->Shutdown(); | 630 cast_environment->Shutdown(); |
631 scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer; | 631 scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer; |
632 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events)); | 632 analyzer.reset(trace_analyzer::TraceAnalyzer::Create(json_events)); |
633 analyzer->AssociateAsyncBeginEndEvents(); | 633 analyzer->AssociateAsyncBeginEndEvents(); |
634 | 634 |
635 MeanAndError frame_data = AnalyzeTraceDistance( | 635 MeanAndError frame_data = AnalyzeTraceDistance( |
636 analyzer.get(), | 636 analyzer.get(), |
637 "OnSwapCompositorFrame"); | 637 TRACE_DISABLED_BY_DEFAULT("OnSwapCompositorFrame")); |
638 | 638 |
639 EXPECT_GT(frame_data.num_values, 0UL); | 639 EXPECT_GT(frame_data.num_values, 0UL); |
640 // Lower is better. | 640 // Lower is better. |
641 frame_data.Print(test_name, | 641 frame_data.Print(test_name, |
642 GetSuffixForTestFlags(), | 642 GetSuffixForTestFlags(), |
643 "time_between_frames", | 643 "time_between_frames", |
644 "ms"); | 644 "ms"); |
645 | 645 |
646 // This prints out the average time between capture events. | 646 // This prints out the average time between capture events. |
647 // As the capture frame rate is capped at 30fps, this score | 647 // As the capture frame rate is capped at 30fps, this score |
(...skipping 24 matching lines...) Expand all Loading... |
672 CastV2PerformanceTest, | 672 CastV2PerformanceTest, |
673 testing::Values( | 673 testing::Values( |
674 kUseGpu | k24fps, | 674 kUseGpu | k24fps, |
675 kUseGpu | k30fps, | 675 kUseGpu | k30fps, |
676 kUseGpu | k60fps, | 676 kUseGpu | k60fps, |
677 kUseGpu | k24fps | kDisableVsync, | 677 kUseGpu | k24fps | kDisableVsync, |
678 kUseGpu | k30fps | kProxyWifi, | 678 kUseGpu | k30fps | kProxyWifi, |
679 kUseGpu | k30fps | kProxyBad, | 679 kUseGpu | k30fps | kProxyBad, |
680 kUseGpu | k30fps | kSlowClock, | 680 kUseGpu | k30fps | kSlowClock, |
681 kUseGpu | k30fps | kFastClock)); | 681 kUseGpu | k30fps | kFastClock)); |
OLD | NEW |