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

Side by Side Diff: components/autofill/browser/autofill_metrics.cc

Issue 14060013: Add UMA stats to track whitelist download latency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move UMA tracking code out of the if/else block. Created 7 years, 8 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 | « components/autofill/browser/autofill_metrics.h ('k') | 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 (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 "components/autofill/browser/autofill_metrics.h" 5 #include "components/autofill/browser/autofill_metrics.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "components/autofill/browser/autofill_type.h" 10 #include "components/autofill/browser/autofill_type.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 case AUTOCHECKOUT_SUCCEEDED: 442 case AUTOCHECKOUT_SUCCEEDED:
443 suffix = "Succeeded"; 443 suffix = "Succeeded";
444 break; 444 break;
445 } 445 }
446 446
447 LogUMAHistogramLongTimes("Autocheckout.FlowDuration", duration); 447 LogUMAHistogramLongTimes("Autocheckout.FlowDuration", duration);
448 LogUMAHistogramLongTimes("Autocheckout.FlowDuration." + suffix, duration); 448 LogUMAHistogramLongTimes("Autocheckout.FlowDuration." + suffix, duration);
449 } 449 }
450 450
451 void AutofillMetrics::LogAutocheckoutWhitelistDownloadDuration(
452 const base::TimeDelta& duration,
453 AutocheckoutWhitelistDownloadStatus status) const {
454 std::string suffix;
455 switch (status) {
456 case AUTOCHECKOUT_WHITELIST_DOWNLOAD_FAILED:
457 suffix = "Failed";
458 break;
459
460 case AUTOCHECKOUT_WHITELIST_DOWNLOAD_SUCCEEDED:
461 suffix = "Succeeded";
462 break;
463 }
464
465 LogUMAHistogramTimes("Autocheckout.WhitelistDownloadDuration", duration);
466 LogUMAHistogramTimes(
467 "Autocheckout.WhitelistDownloadDuration." + suffix, duration);
468 }
469
451 void AutofillMetrics::LogDeveloperEngagementMetric( 470 void AutofillMetrics::LogDeveloperEngagementMetric(
452 DeveloperEngagementMetric metric) const { 471 DeveloperEngagementMetric metric) const {
453 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); 472 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS);
454 473
455 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric, 474 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric,
456 NUM_DEVELOPER_ENGAGEMENT_METRICS); 475 NUM_DEVELOPER_ENGAGEMENT_METRICS);
457 } 476 }
458 477
459 void AutofillMetrics::LogHeuristicTypePrediction( 478 void AutofillMetrics::LogHeuristicTypePrediction(
460 FieldTypeQualityMetric metric, 479 FieldTypeQualityMetric metric,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 const std::string& experiment_id) const { 585 const std::string& experiment_id) const {
567 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); 586 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id);
568 } 587 }
569 588
570 void AutofillMetrics::LogServerExperimentIdForUpload( 589 void AutofillMetrics::LogServerExperimentIdForUpload(
571 const std::string& experiment_id) const { 590 const std::string& experiment_id) const {
572 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); 591 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id);
573 } 592 }
574 593
575 } // namespace autofill 594 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698