summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-20 22:32:51 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-20 22:32:51 +0000
commit978077e09aef57e064f27b61808aeb3856c085a9 (patch)
tree688b4f4077f25216d76446cf74e7e7c254b7c2bb
parenta23aab644c2dfb5eb5d33a730c076c5cbeb5e365 (diff)
downloadchromium_src-978077e09aef57e064f27b61808aeb3856c085a9.zip
chromium_src-978077e09aef57e064f27b61808aeb3856c085a9.tar.gz
chromium_src-978077e09aef57e064f27b61808aeb3856c085a9.tar.bz2
Get correct request to finsh time for histogram
Corrected a typo in generating the stat, and evolved to a new histogram name to avoid confusion. Note that the time between start and finish still needs to be fixed, as that part of the regression is not handled. BUG=14678 r=davemoore Review URL: http://codereview.chromium.org/132072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18896 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/histogram.h20
-rw-r--r--chrome/renderer/render_view.cc6
2 files changed, 21 insertions, 5 deletions
diff --git a/base/histogram.h b/base/histogram.h
index 3a3ddb1..d63263e 100644
--- a/base/histogram.h
+++ b/base/histogram.h
@@ -68,8 +68,14 @@
counter.Add(under_one_hundred); \
} while (0)
-// For folks that need real specific times, use this, but you'll only get
-// samples that are in the range (overly large samples are discarded).
+// For folks that need real specific times, use this to select a precise range
+// of times you want plotted, and the number of buckets you want used.
+#define HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) do { \
+ static Histogram counter((name), min, max, bucket_count); \
+ counter.AddTime(sample); \
+ } while (0)
+
+// DO NOT USE THIS. It is being phased out, in favor of HISTOGRAM_CUSTOM_TIMES.
#define HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) do { \
static Histogram counter((name), min, max, bucket_count); \
if ((sample) < (max)) counter.AddTime(sample); \
@@ -108,6 +114,8 @@
sample)
#define DHISTOGRAM_PERCENTAGE(name, under_one_hundred) HISTOGRAM_PERCENTAGE(\
name, under_one_hundred)
+#define DHISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \
+ HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count)
@@ -117,6 +125,8 @@
#define DHISTOGRAM_COUNTS(name, sample) do {} while (0)
#define DASSET_HISTOGRAM_COUNTS(name, sample) do {} while (0)
#define DHISTOGRAM_PERCENTAGE(name, under_one_hundred) do {} while (0)
+#define DHISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \
+ do {} while (0)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
do {} while (0)
@@ -157,6 +167,12 @@ static const int kRendererHistogramFlag = 1 << 4;
counter.AddTime(sample); \
} while (0)
+#define UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) do { \
+ static Histogram counter((name), min, max, bucket_count); \
+ counter.SetFlags(kUmaTargetedHistogramFlag); \
+ counter.AddTime(sample); \
+ } while (0)
+
#define UMA_HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) do { \
static Histogram counter((name), min, max, bucket_count); \
counter.SetFlags(kUmaTargetedHistogramFlag); \
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5cf511a..9ea36fb 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2812,15 +2812,15 @@ void RenderView::DumpLoadHistograms() const {
TimeDelta finish_doc_to_finish =
finish_load_time - finish_document_load_time;
TimeDelta start_to_finish = finish_load_time - start_load_time;
- TimeDelta request_to_finish = finish_load_time - start_load_time;
+ TimeDelta request_to_finish = finish_load_time - request_time;
TimeDelta request_to_first_layout = first_layout_time - request_time;
TimeDelta start_to_first_layout = first_layout_time - start_load_time;
// Client side redirects will have no request time
if (request_time.ToInternalValue() != 0) {
UMA_HISTOGRAM_MEDIUM_TIMES("Renderer2.RequestToStart", request_to_start);
- UMA_HISTOGRAM_CLIPPED_TIMES(
- FieldTrial::MakeName("Renderer2.RequestToFinish_L", "DnsImpact").data(),
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ FieldTrial::MakeName("Renderer2.RequestToFinish_2", "DnsImpact").data(),
request_to_finish, TimeDelta::FromMilliseconds(10),
TimeDelta::FromMinutes(10), 100);
if (request_to_first_layout.ToInternalValue() >= 0) {