TracingTest adapted to ProtoStream
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1306 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -33,9 +33,8 @@ bool TracingTest::run()
|
|||||||
cout << "[TracingTest] enabling tracing" << endl;
|
cout << "[TracingTest] enabling tracing" << endl;
|
||||||
|
|
||||||
TracingPlugin tp;
|
TracingPlugin tp;
|
||||||
tp.setOstream(&cout);
|
std::ofstream of("trace.pb");
|
||||||
Trace trace;
|
tp.setTraceFile(&of);
|
||||||
tp.setTraceMessage(&trace);
|
|
||||||
// this must be done *after* configuring the plugin:
|
// this must be done *after* configuring the plugin:
|
||||||
simulator.addFlow(&tp);
|
simulator.addFlow(&tp);
|
||||||
|
|
||||||
@ -49,9 +48,9 @@ bool TracingTest::run()
|
|||||||
cout << "INTERRUPT #" << ie.getTriggerNumber() << "\n";
|
cout << "INTERRUPT #" << ie.getTriggerNumber() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "[TracingTest] disabling tracing (trace size: "
|
cout << "[TracingTest] tracing finished. (trace.pb)";
|
||||||
<< std::dec << trace.ByteSize() << " bytes)\n";
|
|
||||||
simulator.removeFlow(&tp);
|
simulator.removeFlow(&tp);
|
||||||
|
of.close();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// serialize trace to file
|
// serialize trace to file
|
||||||
|
|||||||
Reference in New Issue
Block a user