add first simple benchmark reader (it simply spews random data, amount of lines specified in source).

This commit is contained in:
Bernhard Amann 2012-03-26 12:20:39 -07:00
parent 872ad195f7
commit 9732859d44
6 changed files with 256 additions and 11 deletions

View file

@ -7,6 +7,7 @@
#include "ReaderBackend.h"
#include "readers/Ascii.h"
#include "readers/Raw.h"
#include "readers/Benchmark.h"
#include "Event.h"
#include "EventHandler.h"
@ -149,6 +150,7 @@ struct ReaderDefinition {
ReaderDefinition input_readers[] = {
{ BifEnum::Input::READER_ASCII, "Ascii", 0, reader::Ascii::Instantiate },
{ BifEnum::Input::READER_RAW, "Raw", 0, reader::Raw::Instantiate },
{ BifEnum::Input::READER_BENCHMARK, "Benchmark", 0, reader::Benchmark::Instantiate },
// End marker
{ BifEnum::Input::READER_DEFAULT, "None", 0, (ReaderBackend* (*)(ReaderFrontend* frontend))0 }
@ -600,7 +602,7 @@ bool Manager::RemoveStream(const string &name) {
}
if ( i->removed ) {
reporter->Error("Stream %s is already queued for removal. Ignoring", name.c_str());
reporter->Error("Stream %s is already queued for removal. Ignoring remove.", name.c_str());
return false;
}
@ -690,6 +692,11 @@ bool Manager::ForceUpdate(const string &name)
reporter->Error("Stream %s not found", name.c_str());
return false;
}
if ( i->removed ) {
reporter->Error("Stream %s is already queued for removal. Ignoring force update.", name.c_str());
return false;
}
i->reader->Update();