DatabaseCampaign/-Experiment: add burst faults
This change introduces the ability to inject burst faults to the DatabaseCampaign/-Experiment and thus to all derived campaigns/experiments. Change-Id: I491d021ed3953562bd7c908e9de50d448bc8ef33
This commit is contained in:
committed by
Horst Schirmeier
parent
bcf75bceee
commit
ad558abeb6
@ -46,6 +46,10 @@ bool DatabaseCampaign::run() {
|
||||
cmd.addOption("p", "prune-method", Arg::Required,
|
||||
"-p/--prune-method \tWhich import method(s) to use (default: \"%\"; use % and _ as wildcard characters)");
|
||||
|
||||
CommandLine::option_handle BURST =
|
||||
cmd.addOption("","inject-bursts", Arg::None,
|
||||
"--inject-bursts \tinject burst faults (default: single bitflips)");
|
||||
|
||||
if (!cmd.parse()) {
|
||||
log_send << "Error parsing arguments." << std::endl;
|
||||
exit(-1);
|
||||
@ -91,6 +95,14 @@ bool DatabaseCampaign::run() {
|
||||
benchmarks.push_back("%");
|
||||
}
|
||||
|
||||
if (cmd[BURST]) {
|
||||
m_inject_bursts = true;
|
||||
log_send << "fault model: burst" << std::endl;
|
||||
} else {
|
||||
m_inject_bursts = false;
|
||||
log_send << "fault model: single-bit flip" << std::endl;
|
||||
}
|
||||
|
||||
if (cmd[PRUNER]) {
|
||||
m_fspmethod = std::string(cmd[PRUNER].first()->arg);
|
||||
} else {
|
||||
@ -225,7 +237,7 @@ bool DatabaseCampaign::run_variant(Database::Variant variant) {
|
||||
}
|
||||
pilot.set_data_address(data_address);
|
||||
pilot.set_data_width(data_width);
|
||||
|
||||
pilot.set_inject_bursts(m_inject_bursts);
|
||||
|
||||
this->cb_send_pilot(pilot);
|
||||
|
||||
|
||||
@ -39,6 +39,8 @@ class DatabaseCampaign : public Campaign {
|
||||
id_map completed_pilots; // !< map: Pilot IDs -> result count
|
||||
#endif
|
||||
|
||||
bool m_inject_bursts; // !< inject burst faults?
|
||||
|
||||
public:
|
||||
DatabaseCampaign() {};
|
||||
|
||||
@ -61,7 +63,9 @@ public:
|
||||
* 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;}
|
||||
virtual int expected_number_of_results(std::string variant, std::string benchmark) {
|
||||
return (m_inject_bursts ? 1 : 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function that can be used to add command line options
|
||||
|
||||
Reference in New Issue
Block a user