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

Unified Diff: chrome/renderer/render_view.cc

Issue 1088002: 2 experiments: DNS prefetch limit concurrency: TCP split a packet (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/dns_global.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 42146)
+++ chrome/renderer/render_view.cc (working copy)
@@ -1640,7 +1640,8 @@
Send(new ViewHostMsg_DidStopLoading(routing_id_));
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_,
false),
kDelayForCaptureMs);
@@ -2561,7 +2562,8 @@
history_list_offset_ = chrome::kMaxSessionHistoryEntries - 1;
history_list_length_ = history_list_offset_ + 1;
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo,
page_id_, true),
kDelayForForcedCaptureMs);
@@ -4146,10 +4148,18 @@
NavigationState::FromDataSource(main_frame->dataSource());
Time finish = navigation_state->finish_load_time();
- // If we've already dumped or we haven't finished loading, do nothing.
- if (navigation_state->load_histograms_recorded() || finish.is_null())
+ // If we've already dumped, do nothing.
+ if (navigation_state->load_histograms_recorded())
return;
+ // Handle case where user hits "stop" or "back" before loading completely.
+ bool abandoned_page = finish.is_null();
+ if (abandoned_page) {
+ finish = Time::Now();
+ navigation_state->set_finish_load_time(finish);
+ }
+ UMA_HISTOGRAM_ENUMERATION("Renderer4.Abandoned", abandoned_page ? 1 : 0, 2);
+
LogNavigationState(navigation_state, main_frame->dataSource());
NavigationState::LoadType load_type = navigation_state->load_type();
@@ -4271,8 +4281,11 @@
static bool use_dns_histogram(FieldTrialList::Find("DnsImpact") &&
!FieldTrialList::Find("DnsImpact")->group_name().empty());
if (use_dns_histogram) {
- UMA_HISTOGRAM_ENUMERATION(FieldTrial::MakeName(
- "Renderer4.LoadType", "DnsImpact"),
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.Abandoned", "DnsImpact"),
+ abandoned_page ? 1 : 0, 2);
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.LoadType", "DnsImpact"),
load_type, NavigationState::kLoadTypeMax);
switch (load_type) {
case NavigationState::NORMAL_LOAD:
@@ -4304,6 +4317,45 @@
}
}
+ static bool use_packet_split_histogram(FieldTrialList::Find("PacketSplit") &&
+ !FieldTrialList::Find("PacketSplit")->group_name().empty());
+ if (use_packet_split_histogram) {
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.Abandoned", "PacketSplit"),
+ abandoned_page ? 1 : 0, 2);
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.LoadType", "PacketSplit"),
+ load_type, NavigationState::kLoadTypeMax);
+ switch (load_type) {
+ case NavigationState::NORMAL_LOAD:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_NormalLoad", "PacketSplit"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_NORMAL:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadNormal", "PacketSplit"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_RELOAD:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadReload", "PacketSplit"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_CACHE_STALE_OK:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadStaleOk", "PacketSplit"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ default:
+ break;
+ }
+ }
+
static bool use_sdch_histogram(FieldTrialList::Find("GlobalSdch") &&
!FieldTrialList::Find("GlobalSdch")->group_name().empty());
if (use_sdch_histogram) {
« no previous file with comments | « chrome/browser/net/dns_global.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698