OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ASSERT_TRUE(GetRateStats(rate_events, &stats, NULL)); | 376 ASSERT_TRUE(GetRateStats(rate_events, &stats, NULL)); |
377 LOG(INFO) << "FPS = " << 1000000.0 / stats.mean_us; | 377 LOG(INFO) << "FPS = " << 1000000.0 / stats.mean_us; |
378 | 378 |
379 // Print perf results. | 379 // Print perf results. |
380 double mean_ms = stats.mean_us / 1000.0; | 380 double mean_ms = stats.mean_us / 1000.0; |
381 double std_dev_ms = stats.standard_deviation_us / 1000.0 / 1000.0; | 381 double std_dev_ms = stats.standard_deviation_us / 1000.0 / 1000.0; |
382 std::string trace_name = use_compositor_thread_? "gpu_thread" : | 382 std::string trace_name = use_compositor_thread_? "gpu_thread" : |
383 ran_on_gpu ? "gpu" : "software"; | 383 ran_on_gpu ? "gpu" : "software"; |
384 std::string mean_and_error = base::StringPrintf("%f,%f", mean_ms, | 384 std::string mean_and_error = base::StringPrintf("%f,%f", mean_ms, |
385 std_dev_ms); | 385 std_dev_ms); |
386 perf_test::PrintResultMeanAndError(test_name, "", trace_name, | 386 perf_test::PrintResultMeanAndError(test_name, |
387 mean_and_error, "frame_time", true); | 387 std::string(), |
| 388 trace_name, |
| 389 mean_and_error, |
| 390 "frame_time", |
| 391 true); |
388 | 392 |
389 if (flags & kAllowExternalDNS) | 393 if (flags & kAllowExternalDNS) |
390 ResetAllowExternalDNS(); | 394 ResetAllowExternalDNS(); |
391 | 395 |
392 // Close the tab so that we can quit without timing out during the | 396 // Close the tab so that we can quit without timing out during the |
393 // wait-for-idle stage in browser_test framework. | 397 // wait-for-idle stage in browser_test framework. |
394 browser()->tab_strip_model()->GetActiveWebContents()->Close(); | 398 browser()->tab_strip_model()->GetActiveWebContents()->Close(); |
395 } | 399 } |
396 | 400 |
397 private: | 401 private: |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 592 |
589 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { | 593 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { |
590 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 594 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
591 } | 595 } |
592 | 596 |
593 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { | 597 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { |
594 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 598 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
595 } | 599 } |
596 | 600 |
597 } // namespace | 601 } // namespace |
OLD | NEW |