dbcampaign: select multiple variants/benchmark pairs

The variant/benchmark selection now can use SQL LIKE syntax, all unfinished
pilots from all selected variants are sent to the clients. E.g.:

./cored-voter-server  -v x86-cored-voter -b simple-% -p basic

Will select the fsppilots in the variants:

- x86-cored-voter/simple-ip/basic
- x86-cored-voter/simple-instr/basic

The variant and benchmark information is now sent within the
fsppilot.

Change-Id: I287bfcddc478d0b79d89e156d6f5bf8188674532
This commit is contained in:
Christian Dietrich
2013-07-03 22:10:18 +02:00
parent 40f610b536
commit 9843b520c1
5 changed files with 124 additions and 60 deletions

View File

@ -24,7 +24,6 @@ class DatabaseCampaign : public Campaign {
Database *db; // !< The database connection object
DatabaseProtobufAdapter db_connect;
int variant_id; // !< Which variant do we work on (from CMDLINE)
int fspmethod_id; // !< Which fspmethod should be put out to the clients
void collect_result_thread();
@ -41,6 +40,20 @@ public:
*/
virtual bool run();
/**
* Is called by run() for every variant, returned by the variant
* filter (SQL LIKE).
* @return \c true if the campaign was successful, \c false otherwise
*/
virtual bool run_variant(fail::Database::Variant);
/**
* How many results have to are expected from each fsppilot. If
* there are less result rows, the pilot will be again sent to the clients
* @return \c exptected number of results
*/
virtual int expected_number_of_results(std::string variant, std::string benchmark) { return 8;}
/**
* Callback function that can be used to add command line options
* to the campaign