Page Speed Optimization Libraries
1.5.27.2
|
#include "console_suggestions.h"
Public Member Functions | |
ConsoleSuggestionsFactory (Statistics *stats) | |
virtual void | GenerateSuggestions () |
const std::vector < ConsoleSuggestion > * | suggestions () const |
Protected Member Functions | |
int64 | StatValue (StringPiece var_name) |
double | StatRatio (StringPiece numerator, StringPiece denominator) |
Returns ratio of variables (or 0 if denominator is 0). | |
double | StatSumRatio (StringPiece bad, StringPiece good) |
Class which gets all suggestions, sorts them and allows access to the results. Can be subclassed to add implementation-specific suggestions.
virtual void net_instaweb::ConsoleSuggestionsFactory::GenerateSuggestions | ( | ) | [virtual] |
Generate suggestions_. If subclass wants to add it's own suggestions, it should do that first and then call ConsoleSuggestionsFactory::GenerateSuggestions().
double net_instaweb::ConsoleSuggestionsFactory::StatSumRatio | ( | StringPiece | bad, |
StringPiece | good | ||
) | [protected] |
Returns ratio of bad / (good + bad). Common pattern for our stats. (Returns 0 if good + bad = 0).
int64 net_instaweb::ConsoleSuggestionsFactory::StatValue | ( | StringPiece | var_name | ) | [protected] |
Statistics helper functions. Gets value of specific variable (DFATALs if variable doesn't exist).
const std::vector<ConsoleSuggestion>* net_instaweb::ConsoleSuggestionsFactory::suggestions | ( | ) | const [inline] |
Returns the importance-sorted list of ConsoleSuggestions after GenerateSuggestions() has been called.