Commit 2a29004a authored by Lu Chen's avatar Lu Chen Committed by Commit Bot

Processing of anchor metrics in the browser process.

In this CL, metrics from the renderer process are processed in the
browser. We extract document level metrics (e.g., number of links),
as well as derived features (e.g., area rank).

The calculated navigation scores (and other info) from onLoad are
stored and can be looked up when an anchor element is clicked.

Bug: 850624
Change-Id: I3a7516d3a991dc278441fb925822efa780a84b8d
Reviewed-on: https://chromium-review.googlesource.com/1132680Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Lu Chen <chelu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579203}
parent e2069a89
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_H_ #ifndef CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_H_
#define CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_H_ #define CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_H_
#include <string>
#include <unordered_map>
#include <vector> #include <vector>
#include "base/macros.h" #include "base/macros.h"
...@@ -35,8 +37,9 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost { ...@@ -35,8 +37,9 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost {
content::RenderFrameHost* render_frame_host); content::RenderFrameHost* render_frame_host);
private: private:
// Struct holding features of an anchor element, extracted from the browser. // Struct holding navigation score, rank and other info of the anchor element.
struct MetricsFromBrowser; // Used for look up when an anchor element is clicked.
struct NavigationScore;
// blink::mojom::AnchorElementMetricsHost: // blink::mojom::AnchorElementMetricsHost:
void ReportAnchorElementMetricsOnClick( void ReportAnchorElementMetricsOnClick(
...@@ -57,16 +60,25 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost { ...@@ -57,16 +60,25 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost {
void MergeMetricsSameTargetUrl( void MergeMetricsSameTargetUrl(
std::vector<blink::mojom::AnchorElementMetricsPtr>* metrics) const; std::vector<blink::mojom::AnchorElementMetricsPtr>* metrics) const;
// Given metrics of an anchor element from both renderer and browser process, // Computes and stores document level metrics, including |number_of_anchors_|,
// returns navigation score. // |document_engagement_score_|, etc.
double GetAnchorElementScore( void ComputeDocumentMetricsOnLoad(
const blink::mojom::AnchorElementMetrics& metrics_renderer, const std::vector<blink::mojom::AnchorElementMetricsPtr>& metrics);
const MetricsFromBrowser& metrics_browser) const;
// Given a vector of navigation scores, decide what action to take, or decide // Given metrics of an anchor element from both renderer and browser process,
// not to do anything. Example actions including preresolve, preload, // returns navigation score. Virtual for testing purposes.
// prerendering, etc. virtual double CalculateAnchorNavigationScore(
void MaybeTakeActionOnLoad(const std::vector<double>& scores) const; const blink::mojom::AnchorElementMetrics& metrics,
double document_engagement_score,
double target_engagement_score,
int area_rank) const;
// Given a vector of navigation scores sorted in descending order, decide what
// action to take, or decide not to do anything. Example actions including
// preresolve, preload, prerendering, etc.
void MaybeTakeActionOnLoad(
const std::vector<std::unique_ptr<NavigationScore>>&
sorted_navigation_scores) const;
// Record anchor element metrics on page load. // Record anchor element metrics on page load.
void RecordMetricsOnLoad( void RecordMetricsOnLoad(
...@@ -78,6 +90,17 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost { ...@@ -78,6 +90,17 @@ class NavigationPredictor : public blink::mojom::AnchorElementMetricsHost {
// Used to get keyed services. // Used to get keyed services.
content::BrowserContext* const browser_context_; content::BrowserContext* const browser_context_;
// Maps from target url (href) to navigation score.
std::unordered_map<std::string, std::unique_ptr<NavigationScore>>
navigation_scores_map_;
// Total number of anchors that: href has the same host as the document,
// contains image, inside an iframe, href incremented by 1 from document url.
int number_of_anchors_same_host_ = 0;
int number_of_anchors_contains_image_ = 0;
int number_of_anchors_in_iframe_ = 0;
int number_of_anchors_url_incremented_ = 0;
// Timing of document loaded and last click. // Timing of document loaded and last click.
base::TimeTicks document_loaded_timing_; base::TimeTicks document_loaded_timing_;
base::TimeTicks last_click_timing_; base::TimeTicks last_click_timing_;
......
...@@ -91,6 +91,7 @@ IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, NavigationScore) { ...@@ -91,6 +91,7 @@ IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, NavigationScore) {
// Simulate a click at the anchor element. // Simulate a click at the anchor element.
// Test that timing info (DurationLoadToFirstClick) can be recorded. // Test that timing info (DurationLoadToFirstClick) can be recorded.
// And that the navigation score can be looked up.
IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, ClickAnchorElement) { IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, ClickAnchorElement) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
...@@ -109,12 +110,39 @@ IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, ClickAnchorElement) { ...@@ -109,12 +110,39 @@ IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, ClickAnchorElement) {
"AnchorElementMetrics.Clicked.HrefEngagementScore2", 1); "AnchorElementMetrics.Clicked.HrefEngagementScore2", 1);
histogram_tester.ExpectTotalCount( histogram_tester.ExpectTotalCount(
"AnchorElementMetrics.Clicked.DurationLoadToFirstClick", 1); "AnchorElementMetrics.Clicked.DurationLoadToFirstClick", 1);
histogram_tester.ExpectTotalCount(
"AnchorElementMetrics.Clicked.NavigationScore", 1);
} else { } else {
histogram_tester.ExpectTotalCount( histogram_tester.ExpectTotalCount(
"AnchorElementMetrics.Clicked.HrefEngagementScore2", 0); "AnchorElementMetrics.Clicked.HrefEngagementScore2", 0);
} }
} }
// Simulate click at the anchor element.
// Test that correct area ranks are recorded.
IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, AreaRank) {
base::HistogramTester histogram_tester;
// This test file contains 5 anchors with different size.
const GURL& url = GetTestURL("/anchors_different_area.html");
ui_test_utils::NavigateToURL(browser(), url);
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(content::ExecuteScript(
browser()->tab_strip_model()->GetActiveWebContents(),
"document.getElementById('medium').click();"));
base::RunLoop().RunUntilIdle();
if (base::FeatureList::IsEnabled(
blink::features::kRecordAnchorMetricsClicked)) {
histogram_tester.ExpectUniqueSample("AnchorElementMetrics.Clicked.AreaRank",
2, 1);
histogram_tester.ExpectTotalCount("AnchorElementMetrics.Visible.RatioArea",
5);
}
}
// Test that MergeMetricsSameTargetUrl merges anchor elements having the same // Test that MergeMetricsSameTargetUrl merges anchor elements having the same
// href. The html file contains two anchor elements having the same href. // href. The html file contains two anchor elements having the same href.
IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest, IN_PROC_BROWSER_TEST_P(NavigationPredictorBrowserTest,
......
...@@ -4,14 +4,49 @@ ...@@ -4,14 +4,49 @@
#include "chrome/browser/navigation_predictor/navigation_predictor.h" #include "chrome/browser/navigation_predictor/navigation_predictor.h"
#include <map>
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h" #include "base/test/metrics/histogram_tester.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/loader/navigation_predictor.mojom.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace { namespace {
class TestNavigationPredictor : public NavigationPredictor {
public:
explicit TestNavigationPredictor(
mojo::InterfaceRequest<AnchorElementMetricsHost> request,
content::RenderFrameHost* render_frame_host)
: NavigationPredictor(render_frame_host), binding_(this) {
binding_.Bind(std::move(request));
}
~TestNavigationPredictor() override {}
const std::map<GURL, int>& GetAreaRankMap() const { return area_rank_map_; }
private:
double CalculateAnchorNavigationScore(
const blink::mojom::AnchorElementMetrics& metrics,
double document_engagement_score,
double target_engagement_score,
int area_rank) const override {
area_rank_map_.emplace(std::make_pair(metrics.target_url, area_rank));
return 100 * metrics.ratio_area;
}
// Maps from target URL to area rank of the anchor element.
mutable std::map<GURL, int> area_rank_map_;
// Used to bind Mojo interface
mojo::Binding<AnchorElementMetricsHost> binding_;
};
class NavigationPredictorTest : public ChromeRenderViewHostTestHarness { class NavigationPredictorTest : public ChromeRenderViewHostTestHarness {
public: public:
NavigationPredictorTest() = default; NavigationPredictorTest() = default;
...@@ -19,8 +54,8 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness { ...@@ -19,8 +54,8 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness {
void SetUp() override { void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp(); ChromeRenderViewHostTestHarness::SetUp();
NavigationPredictor::Create(mojo::MakeRequest(&predictor_service_), predictor_service_helper_ = std::make_unique<TestNavigationPredictor>(
main_rfh()); mojo::MakeRequest(&predictor_service_), main_rfh());
} }
void TearDown() override { ChromeRenderViewHostTestHarness::TearDown(); } void TearDown() override { ChromeRenderViewHostTestHarness::TearDown(); }
...@@ -28,10 +63,12 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness { ...@@ -28,10 +63,12 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness {
// Helper function to generate mojom metrics. // Helper function to generate mojom metrics.
blink::mojom::AnchorElementMetricsPtr CreateMetricsPtr( blink::mojom::AnchorElementMetricsPtr CreateMetricsPtr(
const std::string& source_url, const std::string& source_url,
const std::string& target_url) const { const std::string& target_url,
float ratio_area) const {
auto metrics = blink::mojom::AnchorElementMetrics::New(); auto metrics = blink::mojom::AnchorElementMetrics::New();
metrics->source_url = GURL(source_url); metrics->source_url = GURL(source_url);
metrics->target_url = GURL(target_url); metrics->target_url = GURL(target_url);
metrics->ratio_area = ratio_area;
return metrics; return metrics;
} }
...@@ -39,8 +76,13 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness { ...@@ -39,8 +76,13 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness {
return predictor_service_.get(); return predictor_service_.get();
} }
TestNavigationPredictor* predictor_service_helper() const {
return predictor_service_helper_.get();
}
private: private:
blink::mojom::AnchorElementMetricsHostPtr predictor_service_; blink::mojom::AnchorElementMetricsHostPtr predictor_service_;
std::unique_ptr<TestNavigationPredictor> predictor_service_helper_;
}; };
} // namespace } // namespace
...@@ -50,7 +92,8 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness { ...@@ -50,7 +92,8 @@ class NavigationPredictorTest : public ChromeRenderViewHostTestHarness {
TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnClick) { TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnClick) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
auto metrics = CreateMetricsPtr("http://example.com", "https://google.com"); auto metrics =
CreateMetricsPtr("http://example.com", "https://google.com", 0.1);
predictor_service()->ReportAnchorElementMetricsOnClick(std::move(metrics)); predictor_service()->ReportAnchorElementMetricsOnClick(std::move(metrics));
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
...@@ -62,7 +105,8 @@ TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnClick) { ...@@ -62,7 +105,8 @@ TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnClick) {
TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnLoad) { TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnLoad) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
auto metrics = CreateMetricsPtr("https://example.com", "http://google.com"); auto metrics =
CreateMetricsPtr("https://example.com", "http://google.com", 0.1);
std::vector<blink::mojom::AnchorElementMetricsPtr> metrics_vector; std::vector<blink::mojom::AnchorElementMetricsPtr> metrics_vector;
metrics_vector.push_back(std::move(metrics)); metrics_vector.push_back(std::move(metrics));
predictor_service()->ReportAnchorElementMetricsOnLoad( predictor_service()->ReportAnchorElementMetricsOnLoad(
...@@ -78,7 +122,8 @@ TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnLoad) { ...@@ -78,7 +122,8 @@ TEST_F(NavigationPredictorTest, ReportAnchorElementMetricsOnLoad) {
TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnClick) { TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnClick) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
auto metrics = CreateMetricsPtr("ftp://example.com", "https://google.com"); auto metrics =
CreateMetricsPtr("ftp://example.com", "https://google.com", 0.1);
predictor_service()->ReportAnchorElementMetricsOnClick(std::move(metrics)); predictor_service()->ReportAnchorElementMetricsOnClick(std::move(metrics));
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
...@@ -91,7 +136,8 @@ TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnClick) { ...@@ -91,7 +136,8 @@ TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnClick) {
TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnLoad) { TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnLoad) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
auto metrics = CreateMetricsPtr("https://example.com", "ftp://google.com"); auto metrics =
CreateMetricsPtr("https://example.com", "ftp://google.com", 0.1);
std::vector<blink::mojom::AnchorElementMetricsPtr> metrics_vector; std::vector<blink::mojom::AnchorElementMetricsPtr> metrics_vector;
metrics_vector.push_back(std::move(metrics)); metrics_vector.push_back(std::move(metrics));
predictor_service()->ReportAnchorElementMetricsOnLoad( predictor_service()->ReportAnchorElementMetricsOnLoad(
...@@ -101,3 +147,43 @@ TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnLoad) { ...@@ -101,3 +147,43 @@ TEST_F(NavigationPredictorTest, BadUrlReportAnchorElementMetricsOnLoad) {
histogram_tester.ExpectTotalCount( histogram_tester.ExpectTotalCount(
"AnchorElementMetrics.Visible.HighestNavigationScore", 0); "AnchorElementMetrics.Visible.HighestNavigationScore", 0);
} }
// In this test, multiple anchor element metrics are sent to
// ReportAnchorElementMetricsOnLoad. Test that CalculateAnchorNavigationScore
// works, and that highest navigation score can be recorded correctly.
TEST_F(NavigationPredictorTest, MultipleAnchorElementMetricsOnLoad) {
base::HistogramTester histogram_tester;
const std::string source = "http://example.com";
const std::string href_xlarge = "http://example.com/xlarge";
const std::string href_large = "http://google.com/large";
const std::string href_medium = "http://google.com/medium";
const std::string href_small = "http://google.com/small";
const std::string href_xsmall = "http://google.com/xsmall";
std::vector<blink::mojom::AnchorElementMetricsPtr> metrics;
metrics.push_back(CreateMetricsPtr(source, href_xsmall, 0.01));
metrics.push_back(CreateMetricsPtr(source, href_large, 0.08));
metrics.push_back(CreateMetricsPtr(source, href_xlarge, 0.1));
metrics.push_back(CreateMetricsPtr(source, href_small, 0.02));
metrics.push_back(CreateMetricsPtr(source, href_medium, 0.05));
int number_of_mertics_sent = metrics.size();
predictor_service()->ReportAnchorElementMetricsOnLoad(std::move(metrics));
base::RunLoop().RunUntilIdle();
const std::map<GURL, int>& area_rank_map =
predictor_service_helper()->GetAreaRankMap();
EXPECT_EQ(number_of_mertics_sent, static_cast<int>(area_rank_map.size()));
EXPECT_EQ(0, area_rank_map.find(GURL(href_xlarge))->second);
EXPECT_EQ(1, area_rank_map.find(GURL(href_large))->second);
EXPECT_EQ(2, area_rank_map.find(GURL(href_medium))->second);
EXPECT_EQ(3, area_rank_map.find(GURL(href_small))->second);
EXPECT_EQ(4, area_rank_map.find(GURL(href_xsmall))->second);
// The highest score is 100 (scale factor) * 0.1 (largest area) = 10.
histogram_tester.ExpectUniqueSample(
"AnchorElementMetrics.Visible.HighestNavigationScore", 10, 1);
histogram_tester.ExpectTotalCount("AnchorElementMetrics.Visible.RatioArea",
5);
}
<html>
<head>
</head>
<body>
<a id="small" href="https://example.com/2"><img height="2" width="2"></a>
<a id="xlarge" href="https://google.com"><img height="5" width="5"></a>
<a id="xmall" href="https://example.com/1"><img height="1" width="1"></a>
<a id="medium" href="https://example.com"><img height="3" width="3"></a>
<a id="large" href="https://dummy.com"><img height="4" width="4"></a>
</body>
</html>
\ No newline at end of file
...@@ -595,6 +595,15 @@ uploading your change for review. ...@@ -595,6 +595,15 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="AnchorElementMetrics.Clicked.AreaRank" units="rank">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The rank of the clicked anchor element in terms of area. This histogram is
recorded when the anchor element is clicked.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.ClickIntervals" units="ms"> <histogram name="AnchorElementMetrics.Clicked.ClickIntervals" units="ms">
<owner>chelu@chromium.org</owner> <owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner> <owner>tbansal@chromium.org</owner>
...@@ -655,6 +664,118 @@ uploading your change for review. ...@@ -655,6 +664,118 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="AnchorElementMetrics.Clicked.NavigationScore" units="score">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The calculated navigation score of the target link (href) of an anchor
element. The score is retrieved from the site engagement service. This
histogram is recorded when the anchor element is clicked and the score has
already been calculated when the document is loaded.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.NavigationScoreRank" units="rank">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The rank of the navigation score of the target link (href) of an anchor
element. This histogram is recorded when the anchor element is clicked and
the score has already been calculated when the document is loaded.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioContainsImage_ContainsImage"
units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements that contains
images and the total number of anchor elements. This histogram is recorded
when the anchor element is clicked and it contains images.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioContainsImage_NoImage"
units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements that contains
images and the total number of anchor elements. This histogram is recorded
when the anchor element is clicked and it does not contain images.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioInIframe_InIframe" units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements that is inside an
iframe and the total number of anchor elements. This histogram is recorded
when the anchor element is clicked and it is inside an iframe.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioInIframe_NotInIframe"
units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements that is inside an
iframe and the total number of anchor elements. This histogram is recorded
when the anchor element is clicked and it is not inside an iframe.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioSameHost_DiffHost" units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements whose href have
the same host as the document and the total number of anchor elements. This
histogram is recorded when the anchor element is clicked and href of the
anchor element has a different host than the document.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.Clicked.RatioSameHost_SameHost" units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements whose href have
the same host as the document and the total number of anchor elements. This
histogram is recorded when the anchor element is clicked and href of the
anchor element has the same host as the document.
</summary>
</histogram>
<histogram
name="AnchorElementMetrics.Clicked.RatioUrlIncremented_NotIncremented"
units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements whose href is
incremented by one from the url of the document and the total number of
anchor elements. This histogram is recorded when the anchor element is
clicked and its href is not incremented by one from the url of the document.
</summary>
</histogram>
<histogram
name="AnchorElementMetrics.Clicked.RatioUrlIncremented_UrlIncremented"
units="%">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The ratio times 100 between the number of anchor elements whose href is
incremented by one from the url of the document and the total number of
anchor elements. This histogram is recorded when the anchor element is
clicked and its href is incremented by one from the url of the document.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.ContainsImage" enum="Boolean"> <histogram name="AnchorElementMetrics.ContainsImage" enum="Boolean">
<owner>chelu@chromium.org</owner> <owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner> <owner>tbansal@chromium.org</owner>
...@@ -663,6 +784,15 @@ uploading your change for review. ...@@ -663,6 +784,15 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="AnchorElementMetrics.DocumentEngagementScore" units="score">
<owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner>
<summary>
The site engagement score of the document URL. The score is retrieved from
the site engagement service.
</summary>
</histogram>
<histogram name="AnchorElementMetrics.IsInIFrame" enum="Boolean"> <histogram name="AnchorElementMetrics.IsInIFrame" enum="Boolean">
<owner>chelu@chromium.org</owner> <owner>chelu@chromium.org</owner>
<owner>tbansal@chromium.org</owner> <owner>tbansal@chromium.org</owner>
...@@ -770,6 +900,16 @@ uploading your change for review. ...@@ -770,6 +900,16 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="AnchorElementMetrics.Visible.NumberOfAnchorElementsAfterMerge"
units="count">
<owner>chelu@chromium.org</owner>
<summary>
The number of anchor element metrics sent to the browser process on a page
load. Anchor elements having the same href are merged and counted as 1. This
histogram is recorded when the webpage is loaded.
</summary>
</histogram>
<histogram name="Android.Activity.ChromeTabbedActivity.StopReason" <histogram name="Android.Activity.ChromeTabbedActivity.StopReason"
enum="AndroidActivityStopReason"> enum="AndroidActivityStopReason">
<owner>dfalcantara@chromium.org</owner> <owner>dfalcantara@chromium.org</owner>
...@@ -115760,6 +115900,7 @@ uploading your change for review. ...@@ -115760,6 +115900,7 @@ uploading your change for review.
<suffix name="Clicked" label="Clicked by the user, on click"/> <suffix name="Clicked" label="Clicked by the user, on click"/>
<suffix name="Visible" label="Intersects with the viewport, on page load"/> <suffix name="Visible" label="Intersects with the viewport, on page load"/>
<affected-histogram name="AnchorElementMetrics.ContainsImage"/> <affected-histogram name="AnchorElementMetrics.ContainsImage"/>
<affected-histogram name="AnchorElementMetrics.DocumentEngagementScore"/>
<affected-histogram name="AnchorElementMetrics.IsInIFrame"/> <affected-histogram name="AnchorElementMetrics.IsInIFrame"/>
<affected-histogram name="AnchorElementMetrics.IsSameHost"/> <affected-histogram name="AnchorElementMetrics.IsSameHost"/>
<affected-histogram name="AnchorElementMetrics.IsUrlIncrementedByOne"/> <affected-histogram name="AnchorElementMetrics.IsUrlIncrementedByOne"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment