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

add IntervalData struct #5205

Merged
merged 6 commits into from
Oct 28, 2022
Merged

Conversation

jeddai
Copy link
Member

@jeddai jeddai commented Oct 27, 2022

This adds a struct for the IntervalData required for behavioral targeting.

EXP-2874

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGES_UNRELEASED.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due dilligence applied in selecting them.

Branch builds: add [ac: android-components-branch-name] and/or [fenix: fenix-branch-name] to the PR title.

Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

First pass on this, looking good!

components/nimbus/src/lib.rs Outdated Show resolved Hide resolved
buckets: VecDeque::new(),
starting_instant: Instant::now(),
};
data.buckets.push_front(0);
Copy link
Member

Choose a reason for hiding this comment

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

Both the increment and rotate handle this case, I don't think you necessarily need to push an i32 into it here in the constructor.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since they no longer handle this is this resolved?

components/nimbus/src/lib.rs Outdated Show resolved Hide resolved
components/nimbus/src/lib.rs Outdated Show resolved Hide resolved
@jeddai jeddai marked this pull request as draft October 27, 2022 20:41
@codecov-commenter
Copy link

Codecov Report

Base: 41.06% // Head: 41.78% // Increases project coverage by +0.72% 🎉

Coverage data is based on head (dcb3b49) compared to base (37ca186).
Patch coverage: 92.02% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5205      +/-   ##
==========================================
+ Coverage   41.06%   41.78%   +0.72%     
==========================================
  Files         170      172       +2     
  Lines       12875    13066     +191     
==========================================
+ Hits         5287     5460     +173     
- Misses       7588     7606      +18     
Impacted Files Coverage Δ
components/nimbus/src/error.rs 17.94% <0.00%> (-2.64%) ⬇️
components/nimbus/src/lib.rs 65.14% <ø> (ø)
components/nimbus/src/behavior.rs 94.53% <94.53%> (ø)
megazords/full/build.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

This is amazing!

components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Show resolved Hide resolved
components/nimbus/src/behavior.rs Show resolved Hide resolved
components/nimbus/src/behavior.rs Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
@jeddai jeddai marked this pull request as ready for review October 28, 2022 18:15
Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

💯 r+

@jeddai jeddai merged commit f37d6d5 into mozilla:main Oct 28, 2022
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.

3 participants