| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/page_load_histograms.h" | 5 #include "chrome/renderer/page_load_histograms.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 begin_to_finish_doc); | 499 begin_to_finish_doc); |
| 500 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcher", | 500 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcher", |
| 501 begin_to_finish_all_loads); | 501 begin_to_finish_all_loads); |
| 502 } | 502 } |
| 503 if (document_state->was_referred_by_prefetcher()) { | 503 if (document_state->was_referred_by_prefetcher()) { |
| 504 PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcherReferrer", | 504 PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcherReferrer", |
| 505 begin_to_finish_doc); | 505 begin_to_finish_doc); |
| 506 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcherReferrer", | 506 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcherReferrer", |
| 507 begin_to_finish_all_loads); | 507 begin_to_finish_all_loads); |
| 508 } | 508 } |
| 509 if (document_state->was_after_preconnect_request()) { |
| 510 PLT_HISTOGRAM("PLT.BeginToFinishDoc_AfterPreconnectRequest", |
| 511 begin_to_finish_doc); |
| 512 PLT_HISTOGRAM("PLT.BeginToFinish_AfterPreconnectRequest", |
| 513 begin_to_finish_all_loads); |
| 514 } |
| 509 | 515 |
| 510 // TODO(mpcomplete): remove the extension-related histograms after we collect | 516 // TODO(mpcomplete): remove the extension-related histograms after we collect |
| 511 // enough data. http://crbug.com/100411 | 517 // enough data. http://crbug.com/100411 |
| 512 const bool use_adblock_histogram = | 518 const bool use_adblock_histogram = |
| 513 chrome::ChromeContentRendererClient::IsAdblockInstalled(); | 519 chrome::ChromeContentRendererClient::IsAdblockInstalled(); |
| 514 if (use_adblock_histogram) { | 520 if (use_adblock_histogram) { |
| 515 UMA_HISTOGRAM_ENUMERATION( | 521 UMA_HISTOGRAM_ENUMERATION( |
| 516 "PLT.Abandoned_ExtensionAdblock", | 522 "PLT.Abandoned_ExtensionAdblock", |
| 517 abandoned_page ? 1 : 0, 2); | 523 abandoned_page ? 1 : 0, 2); |
| 518 switch (load_type) { | 524 switch (load_type) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 812 |
| 807 DCHECK(document_state); | 813 DCHECK(document_state); |
| 808 DCHECK(ds); | 814 DCHECK(ds); |
| 809 GURL url(ds->request().url()); | 815 GURL url(ds->request().url()); |
| 810 Time start = document_state->start_load_time(); | 816 Time start = document_state->start_load_time(); |
| 811 Time finish = document_state->finish_load_time(); | 817 Time finish = document_state->finish_load_time(); |
| 812 // TODO(mbelshe): should we log more stats? | 818 // TODO(mbelshe): should we log more stats? |
| 813 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 819 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
| 814 << url.spec(); | 820 << url.spec(); |
| 815 } | 821 } |
| OLD | NEW |