diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/element.cpp | 2 | ||||
-rw-r--r-- | lib/top_block.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/element.cpp b/lib/element.cpp index 008027c..1781fc7 100644 --- a/lib/element.cpp +++ b/lib/element.cpp @@ -21,7 +21,7 @@ Element::Element(const std::string &name) size_t which = 0; while (true) { - const std::string uid = str(boost::format("%s %u") % name % which); + const std::string uid = str(boost::format("%s_%u") % name % which); try { this->set_uid(uid); diff --git a/lib/top_block.cpp b/lib/top_block.cpp index ee3f0e8..515d898 100644 --- a/lib/top_block.cpp +++ b/lib/top_block.cpp @@ -98,6 +98,8 @@ void TopBlock::wait(void) //however, thread group cant be joined twice and this breaks some qa code //(*this)->thread_group->join_all(); + //QA lockup detection setup + const bool lockup_debug = getenv("GRAS_LOCKUP_DEBUG") != NULL; boost::system_time check_done_time = boost::get_system_time(); bool has_a_done = false; @@ -105,19 +107,19 @@ void TopBlock::wait(void) while (not (*this)->token.unique()) { wait_thread_yield(); - if (boost::get_system_time() > check_done_time) + if (lockup_debug and boost::get_system_time() > check_done_time) { if (has_a_done) { std::cerr << this->query("{\"path\":\"/topology.dot\"}") << std::endl; - check_done_time += boost::posix_time::seconds(2); + check_done_time += boost::posix_time::seconds(3); } BOOST_FOREACH(Apology::Worker *w, (*this)->executor->get_workers()) { BlockActor *actor = dynamic_cast<BlockActor *>(w->get_actor()); if (actor->data->block_state == BLOCK_STATE_DONE) has_a_done = true; } - check_done_time += boost::posix_time::seconds(1); + check_done_time += boost::posix_time::seconds(2); } } } |