diff options
author | Josh Blum | 2013-03-04 02:08:50 -0600 |
---|---|---|
committer | Josh Blum | 2013-03-04 02:08:50 -0600 |
commit | e2268f682b77fdff1db5ddc6c410e226eb3dc1d5 (patch) | |
tree | 82c03c9f1c6d13530dee211fd4548a63dc28d9ed /lib/input_handlers.cpp | |
parent | 38faea0f72741f7732f6973b266ed623ff1428a4 (diff) | |
download | sandhi-e2268f682b77fdff1db5ddc6c410e226eb3dc1d5.tar.gz sandhi-e2268f682b77fdff1db5ddc6c410e226eb3dc1d5.tar.bz2 sandhi-e2268f682b77fdff1db5ddc6c410e226eb3dc1d5.zip |
stats: sweet pie charts for per block stats
Diffstat (limited to 'lib/input_handlers.cpp')
-rw-r--r-- | lib/input_handlers.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp index e51808b..56ead46 100644 --- a/lib/input_handlers.cpp +++ b/lib/input_handlers.cpp @@ -7,6 +7,7 @@ using namespace gras; void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); const size_t index = message.index; @@ -17,11 +18,13 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron:: //because tags are being used for message passing, or this is just the first tag in a stream. this->input_tags_changed[index] = this->input_tags_changed[index] or message.tag.offset != 0; this->inputs_available.set(index); + ta.done(); this->handle_task(); } void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); const size_t index = message.index; @@ -29,11 +32,13 @@ void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Th if (this->block_state == BLOCK_STATE_DONE) return; this->input_queues.push(index, message.buffer); this->inputs_available.set(index); + ta.done(); this->handle_task(); } void BlockActor::handle_input_token(const InputTokenMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); ASSERT(message.index < this->get_num_inputs()); @@ -43,6 +48,7 @@ void BlockActor::handle_input_token(const InputTokenMessage &message, const Ther void BlockActor::handle_input_check(const InputCheckMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); const size_t index = message.index; @@ -55,12 +61,14 @@ void BlockActor::handle_input_check(const InputCheckMessage &message, const Ther //or re-enter handle task so fail logic can mark done else { + ta.done(); this->handle_task(); } } void BlockActor::handle_input_alloc(const InputAllocMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); const size_t index = message.index; @@ -72,6 +80,7 @@ void BlockActor::handle_input_alloc(const InputAllocMessage &message, const Ther void BlockActor::handle_input_update(const InputUpdateMessage &message, const Theron::Address) { + TimerAccumulate ta(this->stats.total_time_input); MESSAGE_TRACER(); const size_t i = message.index; |