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

Side by Side Diff: components/metrics/profiler/profiler_metrics_provider_unittest.cc

Issue 1471073007: Reorganize histograms for persistence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shmem-alloc
Patch Set: added GN changes Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/metrics/profiler/profiler_metrics_provider.h" 5 #include "components/metrics/profiler/profiler_metrics_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/metrics_hashes.h"
10 #include "base/tracked_objects.h" 11 #include "base/tracked_objects.h"
11 #include "components/metrics/metrics_hashes.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using tracked_objects::ProcessDataPhaseSnapshot; 14 using tracked_objects::ProcessDataPhaseSnapshot;
15 using tracked_objects::TaskSnapshot; 15 using tracked_objects::TaskSnapshot;
16 16
17 namespace metrics { 17 namespace metrics {
18 18
19 TEST(ProfilerMetricsProviderTest, RecordData) { 19 TEST(ProfilerMetricsProviderTest, RecordData) {
20 // WARNING: If you broke the below check, you've modified how 20 // WARNING: If you broke the below check, you've modified how
21 // HashMetricName works. Please also modify all server-side code that 21 // HashMetricName works. Please also modify all server-side code that
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 EXPECT_EQ(100, tracked_object->queue_time_total()); 262 EXPECT_EQ(100, tracked_object->queue_time_total());
263 EXPECT_EQ(100, tracked_object->queue_time_sampled()); 263 EXPECT_EQ(100, tracked_object->queue_time_sampled());
264 EXPECT_EQ(HashMetricName("death_thread_ten"), 264 EXPECT_EQ(HashMetricName("death_thread_ten"),
265 tracked_object->exec_thread_name_hash()); 265 tracked_object->exec_thread_name_hash());
266 EXPECT_EQ(177U, tracked_object->process_id()); 266 EXPECT_EQ(177U, tracked_object->process_id());
267 EXPECT_EQ(ProfilerEventProto::TrackedObject::BROWSER, 267 EXPECT_EQ(ProfilerEventProto::TrackedObject::BROWSER,
268 tracked_object->process_type()); 268 tracked_object->process_type());
269 } 269 }
270 270
271 } // namespace metrics 271 } // namespace metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698