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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1426673009: Log UMA for navigation start timestamp skew for browser-initiated loads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation_start_renderer
Patch Set: use UMA_HISTOGRAM_TIMES Created 5 years, 1 month 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // stack. 466 // stack.
467 base::TimeTicks SanitizeNavigationTiming( 467 base::TimeTicks SanitizeNavigationTiming(
468 blink::WebFrameLoadType load_type, 468 blink::WebFrameLoadType load_type,
469 const base::TimeTicks& browser_navigation_start, 469 const base::TimeTicks& browser_navigation_start,
470 const base::TimeTicks& renderer_navigation_start) { 470 const base::TimeTicks& renderer_navigation_start) {
471 if (load_type != blink::WebFrameLoadType::Standard) 471 if (load_type != blink::WebFrameLoadType::Standard)
472 return base::TimeTicks(); 472 return base::TimeTicks();
473 DCHECK(!browser_navigation_start.is_null()); 473 DCHECK(!browser_navigation_start.is_null());
474 base::TimeTicks navigation_start = 474 base::TimeTicks navigation_start =
475 std::min(browser_navigation_start, renderer_navigation_start); 475 std::min(browser_navigation_start, renderer_navigation_start);
476 // TODO(csharrison) Investigate how big a problem the cross process 476 base::TimeDelta difference =
477 // monotonicity really is and on what platforms. Log UMA for: 477 renderer_navigation_start - browser_navigation_start;
478 // |renderer_navigation_start - browser_navigation_start| 478 if (difference > base::TimeDelta()) {
479 UMA_HISTOGRAM_TIMES("Navigation.Start.RendererBrowserDifference.Positive",
480 difference);
481 } else {
482 UMA_HISTOGRAM_TIMES("Navigation.Start.RendererBrowserDifference.Negative",
483 -difference);
484 }
479 return navigation_start; 485 return navigation_start;
480 } 486 }
481 487
482 // PlzNavigate 488 // PlzNavigate
483 CommonNavigationParams MakeCommonNavigationParams( 489 CommonNavigationParams MakeCommonNavigationParams(
484 blink::WebURLRequest* request, 490 blink::WebURLRequest* request,
485 bool should_replace_current_entry) { 491 bool should_replace_current_entry) {
486 const RequestExtraData kEmptyData; 492 const RequestExtraData kEmptyData;
487 const RequestExtraData* extra_data = 493 const RequestExtraData* extra_data =
488 static_cast<RequestExtraData*>(request->extraData()); 494 static_cast<RequestExtraData*>(request->extraData());
(...skipping 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after
5352 mojo::ServiceProviderPtr service_provider; 5358 mojo::ServiceProviderPtr service_provider;
5353 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5359 mojo::URLRequestPtr request(mojo::URLRequest::New());
5354 request->url = mojo::String::From(url); 5360 request->url = mojo::String::From(url);
5355 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5361 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5356 nullptr, nullptr, 5362 nullptr, nullptr,
5357 base::Bind(&OnGotContentHandlerID)); 5363 base::Bind(&OnGotContentHandlerID));
5358 return service_provider.Pass(); 5364 return service_provider.Pass();
5359 } 5365 }
5360 5366
5361 } // namespace content 5367 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698