|
Fawkes API
Fawkes Development Version
|
Estimate the execution time of skills by drawing a random sample from a set of possible values stored in a mongodb database. More...

Public Member Functions | |
| LookupEstimator (MongoDBConnCreator *mongo_connection_manager, Configuration *config, const std::string &cfg_prefix, Logger *logger) | |
| Constructor. More... | |
| float | get_execution_time (const Skill &skill) override |
| Get the estimated execution time for the given skill string. More... | |
| bool | can_provide_exec_time (const Skill &skill) const override |
| Check if this estimator can give an estimate for a given skill. More... | |
| std::pair< SkillerInterface::SkillStatusEnum, std::string > | execute (const Skill &skill) override |
| Let the estimator know that we are executing this skill, so it can apply possible side effects. More... | |
Public Member Functions inherited from fawkes::ExecutionTimeEstimator | |
| ExecutionTimeEstimator (Configuration *config, const ::std::string &cfg_prefix) | |
| Constructor. More... | |
| virtual | ~ExecutionTimeEstimator ()=default |
| Destructor. More... | |
| virtual bool | can_execute (const Skill &skill) |
| Check if this estimator is both allowed and able to give an estimate for a given skill. More... | |
Friends | |
| class | ::ExecutionTimeEstimatorLookupEstimatorThread |
| Friend the ExecutionTimeEstimatorLookupEstimatorThread so that only it can access init. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from fawkes::ExecutionTimeEstimator | |
| std::map< std::string, Skill > | get_skills_from_config (const std::string &path) const |
| Load skill descriptions from a yaml config. More... | |
| template<typename T > | |
| T | get_property (const Property< T > &property) const |
| Get the current property value for active_whitelist_entry_. More... | |
Protected Attributes inherited from fawkes::ExecutionTimeEstimator | |
| Configuration *const | config_ |
| Config to obtain common configurables. More... | |
| const std::string | cfg_prefix_ |
| Config prefix of the estimator. More... | |
| const float | speed_ |
| Config estimator-specific speedup factor. More... | |
| std::map< std::string, Skill >::const_iterator | active_whitelist_entry_ |
| Points to the whitelist entry that matches the skill to execute. More... | |
| const std::map< std::string, Skill > | whitelist_ |
| Whitelist of skills that the estimator is allowed to process. More... | |
| const std::map< std::string, Skill > | blacklist_ |
| Blacklist of skills that the estimator must not process. More... | |
Estimate the execution time of skills by drawing a random sample from a set of possible values stored in a mongodb database.
Definition at line 36 of file lookup_estimator.h.
| fawkes::LookupEstimator::LookupEstimator | ( | MongoDBConnCreator * | mongo_connection_manager, |
| Configuration * | config, | ||
| const std::string & | cfg_prefix, | ||
| Logger * | logger | ||
| ) |
Constructor.
| mongo_connection_manager | The mongodb manager to connect to a lookup collection |
| config | The config to retrieve database related info and the skills to estimates |
| cfg_prefix | The config prefix under which the estimator-specific configurations are found |
| logger | The logger to inform about client connection status |
Definition at line 49 of file lookup_estimator.cpp.
References fawkes::MongoDBConnCreator::create_client(), and fawkes::Logger::log_info().
|
overridevirtual |
Check if this estimator can give an estimate for a given skill.
| skill | The skill object to check. |
Implements fawkes::ExecutionTimeEstimator.
Definition at line 74 of file lookup_estimator.cpp.
References fawkes::Logger::log_error(), and fawkes::ExecutionTimeEstimator::Skill::skill_name.
|
overridevirtual |
Let the estimator know that we are executing this skill, so it can apply possible side effects.
| skill | The skill to execute |
Reimplemented from fawkes::ExecutionTimeEstimator.
Definition at line 151 of file lookup_estimator.cpp.
|
overridevirtual |
Get the estimated execution time for the given skill string.
| skill | The skill object to compute the execution time for. |
Implements fawkes::ExecutionTimeEstimator.
Definition at line 98 of file lookup_estimator.cpp.
References fawkes::ExecutionTimeEstimator::get_property(), fawkes::Logger::log_error(), fawkes::ExecutionTimeEstimator::Skill::skill_name, and fawkes::ExecutionTimeEstimator::speed_.
|
friend |
Friend the ExecutionTimeEstimatorLookupEstimatorThread so that only it can access init.
Definition at line 39 of file lookup_estimator.h.