Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: cc/resources/raster_worker_pool_perftest.cc

Issue 83183005: Add synthetic delay points for latency testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Fixed PerfRasterWorkerPool. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/test/lap_timer.h" 8 #include "cc/test/lap_timer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/perf/perf_test.h" 10 #include "testing/perf/perf_test.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 perf_tasks[task] = new_perf_task; 68 perf_tasks[task] = new_perf_task;
69 } 69 }
70 70
71 perf_tasks_.swap(perf_tasks); 71 perf_tasks_.swap(perf_tasks);
72 } 72 }
73 73
74 void BuildTaskGraph() { 74 void BuildTaskGraph() {
75 unsigned priority = 0; 75 unsigned priority = 0;
76 TaskGraph graph; 76 TaskGraph graph;
77 77
78 size_t raster_tasks_required_for_activation_count = 0u;
79 for (RasterTaskVector::const_iterator it = raster_tasks().begin();
80 it != raster_tasks().end(); ++it) {
81 if (IsRasterTaskRequiredForActivation(it->get()))
82 raster_tasks_required_for_activation_count++;
83 }
84
78 scoped_refptr<internal::WorkerPoolTask> 85 scoped_refptr<internal::WorkerPoolTask>
79 raster_required_for_activation_finished_task( 86 raster_required_for_activation_finished_task(
80 CreateRasterRequiredForActivationFinishedTask()); 87 CreateRasterRequiredForActivationFinishedTask(
88 raster_tasks_required_for_activation_count));
81 internal::GraphNode* raster_required_for_activation_finished_node = 89 internal::GraphNode* raster_required_for_activation_finished_node =
82 CreateGraphNodeForTask( 90 CreateGraphNodeForTask(
83 raster_required_for_activation_finished_task.get(), 91 raster_required_for_activation_finished_task.get(),
84 priority++, 92 priority++,
85 &graph); 93 &graph);
86 94
87 scoped_refptr<internal::WorkerPoolTask> raster_finished_task( 95 scoped_refptr<internal::WorkerPoolTask> raster_finished_task(
88 CreateRasterFinishedTask()); 96 CreateRasterFinishedTask());
89 internal::GraphNode* raster_finished_node = 97 internal::GraphNode* raster_finished_node =
90 CreateGraphNodeForTask(raster_finished_task.get(), 98 CreateGraphNodeForTask(raster_finished_task.get(),
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 RunBuildTaskGraphTest("100_4", 100, 4); 224 RunBuildTaskGraphTest("100_4", 100, 4);
217 RunBuildTaskGraphTest("1000_4", 1000, 4); 225 RunBuildTaskGraphTest("1000_4", 1000, 4);
218 RunBuildTaskGraphTest("10_16", 10, 16); 226 RunBuildTaskGraphTest("10_16", 10, 16);
219 RunBuildTaskGraphTest("100_16", 100, 16); 227 RunBuildTaskGraphTest("100_16", 100, 16);
220 RunBuildTaskGraphTest("1000_16", 1000, 16); 228 RunBuildTaskGraphTest("1000_16", 1000, 16);
221 } 229 }
222 230
223 } // namespace 231 } // namespace
224 232
225 } // namespace cc 233 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698