summaryrefslogtreecommitdiff
path: root/lib/gras_impl/block_actor.hpp
diff options
context:
space:
mode:
authorJosh Blum2013-02-13 01:18:31 -0800
committerJosh Blum2013-02-17 20:53:28 -0600
commit67e0e06f155f4a2eeecafabd4c63b840b41b0709 (patch)
tree126978cbb26297286153c492ff2f5e9d6c5fe8f8 /lib/gras_impl/block_actor.hpp
parent9191fbce9f4d161e4f871231469ef009c86f177f (diff)
downloadsandhi-67e0e06f155f4a2eeecafabd4c63b840b41b0709.tar.gz
sandhi-67e0e06f155f4a2eeecafabd4c63b840b41b0709.tar.bz2
sandhi-67e0e06f155f4a2eeecafabd4c63b840b41b0709.zip
gras: work on stats messages and xml formatting
Diffstat (limited to 'lib/gras_impl/block_actor.hpp')
-rw-r--r--lib/gras_impl/block_actor.hpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index ac0bf46..2aee666 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -6,12 +6,12 @@
#include <gras_impl/debug.hpp>
#include <gras_impl/bitset.hpp>
#include <gras/gras.hpp>
-#include <gras/chrono.hpp>
#include <gras/block.hpp>
#include <gras/top_block.hpp>
#include <gras/thread_pool.hpp>
#include <Apology/Worker.hpp>
#include <gras_impl/token.hpp>
+#include <gras_impl/stats.hpp>
#include <gras_impl/messages.hpp>
#include <gras_impl/output_buffer_queues.hpp>
#include <gras_impl/input_buffer_queues.hpp>
@@ -22,16 +22,6 @@
namespace gras
{
-struct BlockStats
-{
- time_ticks_t start_time;
- time_ticks_t stop_time;
-
- size_t work_count;
- time_ticks_t total_time_work;
- time_ticks_t total_time_work_other;
-};
-
struct BlockActor : Apology::Worker
{
BlockActor(void);
@@ -67,6 +57,7 @@ struct BlockActor : Apology::Worker
this->RegisterHandler(this, &BlockActor::handle_output_update);
this->RegisterHandler(this, &BlockActor::handle_self_kick);
+ this->RegisterHandler(this, &BlockActor::handle_get_stats);
}
//handlers
@@ -94,6 +85,7 @@ struct BlockActor : Apology::Worker
void handle_output_update(const OutputUpdateMessage &, const Theron::Address);
void handle_self_kick(const SelfKickMessage &, const Theron::Address);
+ void handle_get_stats(const GetStatsMessage &, const Theron::Address);
//helpers
void buffer_returner(const size_t index, SBuffer &buffer);