Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 8854: Implement search counter p3a metric. #5302

Merged
merged 3 commits into from
May 6, 2020

Conversation

iefremov
Copy link
Contributor

@iefremov iefremov commented Apr 21, 2020

Resolves brave/brave-browser#8854

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@iefremov iefremov force-pushed the ie_p3a_search_volume branch from 5e526b2 to a02e213 Compare April 21, 2020 15:09
@iefremov iefremov changed the title Ie p3a search volume Issue 8854: Implement search counter p3a metric. Apr 21, 2020
@iefremov iefremov force-pushed the ie_p3a_search_volume branch 2 times, most recently from 8c00730 to 5e4ff2c Compare April 21, 2020 15:18
@iefremov iefremov requested review from AndriusA and simonhong April 21, 2020 15:18
@iefremov iefremov self-assigned this Apr 21, 2020
@simonhong
Copy link
Member

Sorry, I don't have enough time to review today. I'll review tomorrow!

Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit comment.
Nice to have generalized weekly storage 👍


void BraveOmniboxClientImpl::OnInputAccepted(const AutocompleteMatch& match) {
// TODO(iefremov): Optimize this.
WeeklyStorage storage(profile_->GetPrefs(), kSearchCountPrefName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This could be moved into the below if clause.

@iefremov iefremov force-pushed the ie_p3a_search_volume branch from 86d6eb1 to d84ed0a Compare April 29, 2020 09:55
iefremov added 2 commits May 4, 2020 23:06
Fix brave/brave-browser#8854

To start measuring search volumes we start with omnibox - we would
count all search-related events coming from here. This PR also
refactors the utility class for recording "weekly" metrics.
@iefremov iefremov force-pushed the ie_p3a_search_volume branch from d84ed0a to 458b13b Compare May 4, 2020 16:15
@bsclifton bsclifton added this to the 1.10.x - Nightly milestone May 6, 2020
@iefremov
Copy link
Contributor Author

iefremov commented May 6, 2020

CI errors unrelated

@iefremov iefremov merged commit 5676d95 into master May 6, 2020
@iefremov iefremov deleted the ie_p3a_search_volume branch May 6, 2020 08:44
bsclifton pushed a commit that referenced this pull request May 12, 2020
Issue 8854: Implement search counter p3a metric.
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 13, 2020

Verification passed on Windows 10 x64 using

Brave | 1.10.53 Chromium: 81.0.4044.138 (Official Build) nightly (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | Windows 10 OS Version 1803 (Build 17134.1006)

Clean profile

  • Performed a search in the Omnibox/URL bar and ensured that the response value is displayed as 1 for Brave.Omnibox.SearchCount
  • Performed search 2 times in Omnibox/URL bar and ensured that the response value is displayed as 1 for Brave.Omnibox.SearchCount
  • Performed search 3 times in Omnibox/URL bar and ensured that the response value is displayed as 1 for Brave.Omnibox.SearchCount
  • Performed search 4 times in Omnibox/URL bar and ensured that the response value is displayed as 1 for Brave.Omnibox.SearchCount
  • Performed search 5 times in Omnibox/URL bar and ensured that the response value is displayed as 1 for Brave.Omnibox.SearchCount
  • Performed search for 6 times or 6+ upto 10 times in Omnibox/URL bar and ensured that the response value is displayed as 2 for Brave.Omnibox.SearchCount
  • Performed search for 11 times or 11+ upto 20 times in Omnibox/URL bar and ensured that the response value is displayed as 3 for Brave.Omnibox.SearchCount
  • Performed search for 21 times or 21+ upto 50 times in Omnibox/URL bar and ensured that the response value is displayed as 4 for Brave.Omnibox.SearchCount
  • Performed search for 51 times or 51+ upto 100 times in Omnibox/URL bar and ensured that the response value is displayed as 5 for Brave.Omnibox.SearchCount
  • Performed search for 101 times or 101+ upto 500 times in Omnibox/URL bar and ensured that the response value is displayed as 6 for Brave.Omnibox.SearchCount
  • Performed search for 501+ times in Omnibox/URL bar and ensured that the response value is displayed as 7 for Brave.Omnibox.SearchCount

Upgraded profile [Upgrade from 1.8.x to 1.10.x]

  • Ensured that Brave.Omnibox.SearchCount is NOT present in 1.8.x
  • Installed 1.8.x and upgraded to 1.10.x and performed search and ensured that response value is displayed as expected in upgraded profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[P3A] Implement search volume question
4 participants