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: chrome/browser/metrics/metrics_log_unittest.cc

Issue 17770005: Include CPU information in UMA system profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 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 | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/common/metrics/proto/system_profile.proto » ('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 (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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/port.h" 9 #include "base/port.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 EXPECT_EQ(kBrandForTesting, system_profile.brand_code()); 154 EXPECT_EQ(kBrandForTesting, system_profile.brand_code());
155 155
156 const metrics::SystemProfileProto::Hardware& hardware = 156 const metrics::SystemProfileProto::Hardware& hardware =
157 system_profile.hardware(); 157 system_profile.hardware();
158 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width()); 158 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width());
159 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height()); 159 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height());
160 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor()); 160 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor());
161 EXPECT_EQ(kScreenCount, hardware.screen_count()); 161 EXPECT_EQ(kScreenCount, hardware.screen_count());
162 162
163 EXPECT_TRUE(hardware.has_cpu());
164 EXPECT_TRUE(hardware.cpu().has_vendor_name());
165 EXPECT_TRUE(hardware.cpu().has_signature());
166
163 // TODO(isherman): Verify other data written into the protobuf as a result 167 // TODO(isherman): Verify other data written into the protobuf as a result
164 // of this call. 168 // of this call.
165 } 169 }
166 170
167 virtual void SetUp() OVERRIDE { 171 virtual void SetUp() OVERRIDE {
168 #if defined(OS_CHROMEOS) 172 #if defined(OS_CHROMEOS)
169 mock_dbus_thread_manager_ = 173 mock_dbus_thread_manager_ =
170 new chromeos::MockDBusThreadManagerWithoutGMock(); 174 new chromeos::MockDBusThreadManagerWithoutGMock();
171 chromeos::DBusThreadManager::InitializeForTesting( 175 chromeos::DBusThreadManager::InitializeForTesting(
172 mock_dbus_thread_manager_); 176 mock_dbus_thread_manager_);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 EXPECT_EQ(113, tracked_object->exec_time_sampled()); 328 EXPECT_EQ(113, tracked_object->exec_time_sampled());
325 EXPECT_EQ(108, tracked_object->queue_time_total()); 329 EXPECT_EQ(108, tracked_object->queue_time_total());
326 EXPECT_EQ(103, tracked_object->queue_time_sampled()); 330 EXPECT_EQ(103, tracked_object->queue_time_sampled());
327 EXPECT_EQ(GG_UINT64_C(7246674144371406371), 331 EXPECT_EQ(GG_UINT64_C(7246674144371406371),
328 tracked_object->exec_thread_name_hash()); 332 tracked_object->exec_thread_name_hash());
329 EXPECT_EQ(1177U, tracked_object->process_id()); 333 EXPECT_EQ(1177U, tracked_object->process_id());
330 EXPECT_EQ(ProfilerEventProto::TrackedObject::RENDERER, 334 EXPECT_EQ(ProfilerEventProto::TrackedObject::RENDERER,
331 tracked_object->process_type()); 335 tracked_object->process_type());
332 } 336 }
333 } 337 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/common/metrics/proto/system_profile.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698