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

Side by Side Diff: gpu/perftests/measurements.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « gpu/ipc/BUILD.gn ('k') | gpu/perftests/measurements.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef GPU_PERFTESTS_MEASUREMENTS_H_ 5 #ifndef GPU_PERFTESTS_MEASUREMENTS_H_
6 #define GPU_PERFTESTS_MEASUREMENTS_H_ 6 #define GPU_PERFTESTS_MEASUREMENTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class GPUTimingClient; 14 class GPUTimingClient;
15 class GPUTimer; 15 class GPUTimer;
16 } 16 }
17 17
18 namespace gpu { 18 namespace gpu {
19 19
20 struct Measurement { 20 struct Measurement {
21 Measurement(); 21 Measurement();
22 Measurement(const Measurement& m); 22 Measurement(const Measurement& m);
23 Measurement(const std::string& name, 23 Measurement(const std::string& name,
24 const base::TimeDelta wall_time, 24 const base::TimeDelta wall_time,
25 const base::TimeDelta cpu_time, 25 const base::TimeDelta cpu_time,
26 const base::TimeDelta gpu_time); 26 const base::TimeDelta gpu_time);
27 ~Measurement(); 27 ~Measurement();
28 28
29 void PrintResult(const std::string& suffix) const; 29 void PrintResult(const std::string& graph) const;
30 Measurement& Increment(const Measurement& m); 30 Measurement& Increment(const Measurement& m);
31 Measurement Divide(int a) const; 31 Measurement Divide(int a) const;
32 32
33 std::string name; 33 std::string name;
34 base::TimeDelta wall_time; 34 base::TimeDelta wall_time;
35 base::TimeDelta cpu_time; 35 base::TimeDelta cpu_time;
36 base::TimeDelta gpu_time; 36 base::TimeDelta gpu_time;
37 }; 37 };
38 38
39 // Class to measure wall, cpu and gpu time deltas. 39 // Class to measure wall, cpu and gpu time deltas.
(...skipping 11 matching lines...) Expand all
51 base::TimeTicks cpu_time_start_; 51 base::TimeTicks cpu_time_start_;
52 scoped_ptr<gfx::GPUTimer> gpu_timer_; 52 scoped_ptr<gfx::GPUTimer> gpu_timer_;
53 53
54 base::TimeDelta wall_time_; 54 base::TimeDelta wall_time_;
55 base::TimeDelta cpu_time_; 55 base::TimeDelta cpu_time_;
56 }; 56 };
57 57
58 } // namespace gpu 58 } // namespace gpu
59 59
60 #endif // GPU_PERFTESTS_MEASUREMENTS_H_ 60 #endif // GPU_PERFTESTS_MEASUREMENTS_H_
OLDNEW
« no previous file with comments | « gpu/ipc/BUILD.gn ('k') | gpu/perftests/measurements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698