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

Side by Side Diff: content/gpu/gpu_info_collector_win.cc

Issue 10828165: Refine WinSAT histogram bounds and rescale so the results are integers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/gpu/gpu_info_collector.h" 5 #include "content/gpu/gpu_info_collector.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <d3d9.h> 8 #include <d3d9.h>
9 #include <setupapi.h> 9 #include <setupapi.h>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 stats.gaming = ReadXMLFloatValue(&reader); 129 stats.gaming = ReadXMLFloatValue(&reader);
130 } 130 }
131 131
132 if (stats.overall == 0.0) 132 if (stats.overall == 0.0)
133 LOG(ERROR) << "Could not read overall score from assessment results."; 133 LOG(ERROR) << "Could not read overall score from assessment results.";
134 if (stats.graphics == 0.0) 134 if (stats.graphics == 0.0)
135 LOG(ERROR) << "Could not read graphics score from assessment results."; 135 LOG(ERROR) << "Could not read graphics score from assessment results.";
136 if (stats.gaming == 0.0) 136 if (stats.gaming == 0.0)
137 LOG(ERROR) << "Could not read gaming score from assessment results."; 137 LOG(ERROR) << "Could not read gaming score from assessment results.";
138 138
139 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.OverallScore", 139 UMA_HISTOGRAM_ENUMERATION("GPU.WinSAT.OverallScore", stats.overall * 10, 200);
jar (doing other things) 2012/08/04 02:04:46 In addition to my comment below.... I was surpris
dtu 2012/08/06 21:41:47 Done.
140 stats.overall, 0.0, 50.0, 50); 140 UMA_HISTOGRAM_ENUMERATION("GPU.WinSAT.GraphicsScore",
141 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GraphicsScore", 141 stats.graphics * 10, 200);
142 stats.graphics, 0.0, 50.0, 50); 142 UMA_HISTOGRAM_ENUMERATION("GPU.WinSAT.GamingScore", stats.gaming * 10, 200);
jar (doing other things) 2012/08/04 02:04:46 Best practice, when changing the parameters by whi
dtu 2012/08/06 21:41:47 Done.
143 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GamingScore",
144 stats.gaming, 0.0, 50.0, 50);
145 143
146 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime", 144 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime",
147 base::TimeTicks::Now() - start_time); 145 base::TimeTicks::Now() - start_time);
148 146
149 return stats; 147 return stats;
150 } 148 }
151 149
152 } // namespace anonymous 150 } // namespace anonymous
153 151
154 namespace gpu_info_collector { 152 namespace gpu_info_collector {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 386
389 size_t pos = gl_version_string.find_last_not_of("0123456789."); 387 size_t pos = gl_version_string.find_last_not_of("0123456789.");
390 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { 388 if (pos != std::string::npos && pos < gl_version_string.length() - 1) {
391 gpu_info->driver_version = gl_version_string.substr(pos + 1); 389 gpu_info->driver_version = gl_version_string.substr(pos + 1);
392 return true; 390 return true;
393 } 391 }
394 return false; 392 return false;
395 } 393 }
396 394
397 } // namespace gpu_info_collector 395 } // namespace gpu_info_collector
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698