diff options
author | Josh Blum | 2013-02-13 20:19:57 -0800 |
---|---|---|
committer | Josh Blum | 2013-02-17 20:53:28 -0600 |
commit | 2cf3ce8bbee29b8906ba4f07b611a922d7ff71d1 (patch) | |
tree | dc300cba8399d85b5ffe3860ab60945c8a3ab827 | |
parent | 67e0e06f155f4a2eeecafabd4c63b840b41b0709 (diff) | |
download | sandhi-2cf3ce8bbee29b8906ba4f07b611a922d7ff71d1.tar.gz sandhi-2cf3ce8bbee29b8906ba4f07b611a922d7ff71d1.tar.bz2 sandhi-2cf3ce8bbee29b8906ba4f07b611a922d7ff71d1.zip |
gras: commit this to play on another branch
-rw-r--r-- | lib/top_block.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/top_block.cpp b/lib/top_block.cpp index 0898e50..714ff4a 100644 --- a/lib/top_block.cpp +++ b/lib/top_block.cpp @@ -161,14 +161,15 @@ std::string TopBlock::get_stats_xml(void) GetStatsReceiver receiver; (*this)->executor->post_all(GetStatsMessage(), receiver); std::string xml; + xml += str(boost::format(" <now>%ull</now>\n") % time_now()); + xml += str(boost::format(" <tps>%ull</tps>\n") % time_tps()); BOOST_FOREACH(const GetStatsMessage &message, receiver.messages) { std::string block_xml; block_xml += str(boost::format(" <id>%s</id>\n") % message.block_id); - block_xml += str(boost::format(" <tps>%ull</tps>\n") % time_tps()); block_xml += str(boost::format(" <start_time>%llu</start_time>\n") % message.stats.start_time); block_xml += str(boost::format(" <stop_time>%llu</stop_time>\n") % message.stats.stop_time); - xml += str(boost::format("<block>\n%s</block>\n") % block_xml); + xml += str(boost::format(" <block>\n%s</block>\n") % block_xml); } return str(boost::format("<gras_stats>\n%s</gras_stats>") % xml); } |