RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <agent_config.h>
Classes | |
struct | Interval |
Public Types | |
enum | HashOn { NONE, RANDOM, EXCHANGEID, PROVIDERID } |
Public Member Functions | |
void | swap (UserPartition &other) |
void | clear () |
bool | empty () const |
bool | matches (const UserIds &ids) const |
void | fromJson (const Json::Value &json) |
Json::Value | toJson () const |
Public Attributes | |
enum RTBKIT::UserPartition::HashOn | hashOn |
int | modulus |
Max value of hash that's achievable. | |
std::vector< Interval > | includeRanges |
Describes a way in which users are partitioned consistently in order to allow for A/B testing.
Definition at line 104 of file agent_config.h.
NONE |
Hash always returns zero. |
RANDOM |
Random number. |
EXCHANGEID |
Hash on md5(exchange ID) |
PROVIDERID |
Hash on md5(provider ID) |
Definition at line 111 of file agent_config.h.
void RTBKIT::UserPartition::fromJson | ( | const Json::Value & | json | ) |
Parse from JSON.
Definition at line 226 of file agent_config.cc.
bool RTBKIT::UserPartition::matches | ( | const UserIds & | ids | ) | const |
Return true if the user matches the user partition.
Definition at line 166 of file agent_config.cc.
Json::Value RTBKIT::UserPartition::toJson | ( | ) | const |
Return as JSON
Definition at line 263 of file agent_config.cc.
std::vector<Interval> RTBKIT::UserPartition::includeRanges |
A list of the hash ranges that are accepted.
Definition at line 144 of file agent_config.h.