want user modulo user feature scope selector

Bug #666544 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Martin Pool

Bug Description

We'd like a way to select a feature for only a particular fraction of users, perhaps by selecting (a < (user_id % m) <= b).

The formula used should be stable if we want to ramp up the number of users in a particular experiment or have multiple streams of the experiment, so just (user_id % m) == 0 is not enough.

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 666544] [NEW] want user modulo user feature scope selector

Sounds nice; perhaps using , in the value for the rule will be enough.

Curtis Hovey (sinzui)
Changed in launchpad:
status: Confirmed → Triaged
Revision history for this message
Martin Pool (mbp) wrote :

Robert has some suggestions about implementation for this in <https://lists.launchpad.net/launchpad-dev/msg07250.html>, specifically towards getting a slice of users.

So there could possibly be two different scopes: consistent x% of sessions (including anonymous users), and separately a consistent x% of users. The difference would be in the first case logged-in users would possibly see different behaviour from one machine to another. That may not matter.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 666544] Re: want user modulo user feature scope selector

You would avoid this confusion by using two rules:
flag userfraction 1 5%
flag anonfraction 0 5%

That way 5% of logged in user and 5% of anonymous users would get the
flag, and the implementation for userfraction would store in the user
session db serverside, the anonfraction one in a cookie client side.

Revision history for this message
Martin Pool (mbp) wrote :

On 3 June 2011 10:21, Robert Collins <email address hidden> wrote:
> You would avoid this confusion by using two rules:
> flag userfraction 1 5%
> flag anonfraction 0 5%
>
> That way 5% of logged in user and 5% of anonymous users would get the
> flag, and the implementation for userfraction would store in the user
> session db serverside, the anonfraction one in a cookie client side.

Yep, that's what I mean by providing two different scopes.

Martin Pool (mbp)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Martin Pool (mbp)
Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Martin Pool (mbp)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.