Page Speed Optimization Libraries
1.3.25.1
|
#include "furious_matcher.h"
Public Member Functions | |
virtual bool | ClassifyIntoExperiment (const RequestHeaders &headers, RewriteOptions *options) |
virtual void | StoreExperimentData (int state, const StringPiece &url, int64 expiration_time_ms, ResponseHeaders *headers) |
Provides a way to replace the mapping of clients/sessions to furious experiments.
Furious is the A/B experiment framework that enables us to track page speed statistics and correlate them with different sets of rewriters. The default implementation uses cookies to send clients to the same experiment consistently. This implementation can be overridden to divide clients/sessions into experiments using a different mechanism.
virtual bool net_instaweb::FuriousMatcher::ClassifyIntoExperiment | ( | const RequestHeaders & | headers, |
RewriteOptions * | options | ||
) | [virtual] |
Decides which experiment to place the current client/session into. Returns true if the mapping needs to be stored.
virtual void net_instaweb::FuriousMatcher::StoreExperimentData | ( | int | state, |
const StringPiece & | url, | ||
int64 | expiration_time_ms, | ||
ResponseHeaders * | headers | ||
) | [virtual] |
Stores the client/session -> experiment mapping for the domain indicated by url. The experiment id is indicated by state. The default implementation stores this in a cookie in the response headers, setting it to expire at expiration_time_ms (specified as ms since the epoch).