Skip to content
Snippets Groups Projects
Commit c82a7515 authored by klijn1's avatar klijn1
Browse files

Additional plotting

parent 779def9a
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,7 @@ public: ...@@ -65,6 +65,7 @@ public:
{ // take the lock { // take the lock
std::lock_guard<std::mutex> guard(mutex_); std::lock_guard<std::mutex> guard(mutex_);
traces_.push_back({ probe_id.gid, probe_id.index, std::move(trace) }); traces_.push_back({ probe_id.gid, probe_id.index, std::move(trace) });
} }
//Tell the other side to wake up outside of the lock //Tell the other side to wake up outside of the lock
...@@ -102,6 +103,7 @@ void publisher( ...@@ -102,6 +103,7 @@ void publisher(
// We now have the mutex // We now have the mutex
// Copy / swap the mutex guarded variables // Copy / swap the mutex guarded variables
traces_local.clear(); // assure we are empty
traces_local.swap(traces); traces_local.swap(traces);
quit_local = quit; quit_local = quit;
...@@ -111,6 +113,7 @@ void publisher( ...@@ -111,6 +113,7 @@ void publisher(
wake_up.notify_one(); wake_up.notify_one();
// Simple plotting // Simple plotting
std::cout << "We are sending traces: "<< traces_local.size() << " \n";
for (auto& entry : traces_local) { for (auto& entry : traces_local) {
auto gid = std::get<0>(entry); auto gid = std::get<0>(entry);
auto lid = std::get<1>(entry); auto lid = std::get<1>(entry);
...@@ -130,7 +133,7 @@ void publisher( ...@@ -130,7 +133,7 @@ void publisher(
multimeter.Record(datum); multimeter.Record(datum);
} }
} }
traces_local.clear();
relay.Send(multimeter.node()); relay.Send(multimeter.node());
multimeter.node().reset(); multimeter.node().reset();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment