-
Notifications
You must be signed in to change notification settings - Fork 893
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
Improve some P3A metrics #3931
Improve some P3A metrics #3931
Conversation
@tmancey @NejcZdovc PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
@@ -50,6 +50,10 @@ void RecordAdsState(AdsP3AState state); | |||
void UpdateAdsP3AOnPreferenceChange(PrefService* prefs, | |||
const std::string& pref); | |||
|
|||
// Records an initial metric state ("disabled" or "enabled") if it was not done | |||
// before. Intended to be called if the user has already created a wallet. | |||
void MaybeRecordInitialAdsP3AState(PrefService* local_state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be prefs
instead of local_state
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, currently all metrics are intentionally stored in global state, so using it here is also fine. Atm we are ok with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I should be more clear. I am talking about variable name. Because in h file you have MaybeRecordInitialAdsP3AState(PrefService* local_state)
, but in cc you have MaybeRecordInitialAdsP3AState(PrefService* prefs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment about a variable name, but not a blocker
Thanks @tmancey @NejcZdovc |
20aa0d2
to
b65aae2
Compare
Ran into GLIBC error on Linux |
b8fb4c0
to
be5548a
Compare
Rebased - CI is running again for Linux 😄 GLIBC problem has been resolved (not related to this PR). Should be able to merge this soon and uplift to 1.2 |
We want only two buckets instead of the Chromium default ones, so the existing histogram is transformed according to our needs.
We were recording a wrong value ("No wallet") even if the user already had had a wallet in place. Now we try to properly record it and do it only once with the help of an additional flag.
Verification passed with
metric
metric
|
Fixes brave/brave-browser#6841
Fixes brave/brave-browser#7253
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.