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

Side by Side Diff: chrome/renderer/renderer_histogram_snapshots.cc

Issue 7696017: Cache the ranges_ vector and share the ranges_ vector (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_service.cc ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/renderer_histogram_snapshots.h" 5 #include "chrome/renderer/renderer_histogram_snapshots.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return handled; 44 return handled;
45 } 45 }
46 46
47 void RendererHistogramSnapshots::OnGetRendererHistograms(int sequence_number) { 47 void RendererHistogramSnapshots::OnGetRendererHistograms(int sequence_number) {
48 SendHistograms(sequence_number); 48 SendHistograms(sequence_number);
49 } 49 }
50 50
51 void RendererHistogramSnapshots::UploadAllHistrograms(int sequence_number) { 51 void RendererHistogramSnapshots::UploadAllHistrograms(int sequence_number) {
52 DCHECK_EQ(0u, pickled_histograms_.size()); 52 DCHECK_EQ(0u, pickled_histograms_.size());
53 53
54 StatisticsRecorder::CollectHistogramStats("Renderer");
55
54 // Push snapshots into our pickled_histograms_ vector. 56 // Push snapshots into our pickled_histograms_ vector.
55 TransmitAllHistograms(Histogram::kIPCSerializationSourceFlag, false); 57 TransmitAllHistograms(Histogram::kIPCSerializationSourceFlag, false);
56 58
57 // Send the sequence number and list of pickled histograms over synchronous 59 // Send the sequence number and list of pickled histograms over synchronous
58 // IPC, so we can clear pickled_histograms_ afterwards. 60 // IPC, so we can clear pickled_histograms_ afterwards.
59 RenderThread::Get()->Send(new ChromeViewHostMsg_RendererHistograms( 61 RenderThread::Get()->Send(new ChromeViewHostMsg_RendererHistograms(
60 sequence_number, pickled_histograms_)); 62 sequence_number, pickled_histograms_));
61 63
62 pickled_histograms_.clear(); 64 pickled_histograms_.clear();
63 } 65 }
(...skipping 17 matching lines...) Expand all
81 void RendererHistogramSnapshots::UniqueInconsistencyDetected(int problem) { 83 void RendererHistogramSnapshots::UniqueInconsistencyDetected(int problem) {
82 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesRendererUnique", 84 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesRendererUnique",
83 problem, Histogram::NEVER_EXCEEDED_VALUE); 85 problem, Histogram::NEVER_EXCEEDED_VALUE);
84 } 86 }
85 87
86 void RendererHistogramSnapshots::SnapshotProblemResolved(int amount) { 88 void RendererHistogramSnapshots::SnapshotProblemResolved(int amount) {
87 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotRenderer", 89 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotRenderer",
88 std::abs(amount)); 90 std::abs(amount));
89 } 91 }
90 92
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698