summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/block_handlers.cpp1
-rw-r--r--lib/gras_impl/stats.hpp1
-rw-r--r--lib/top_block_query.cpp1
-rw-r--r--python/gras/query/chart_total_io_counts.js3
4 files changed, 6 insertions, 0 deletions
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index ffa400e..318b734 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -147,6 +147,7 @@ void BlockActor::handle_get_stats(
this->stats.tags_enqueued[i] = this->input_tags[i].size();
this->stats.msgs_enqueued[i] = this->input_msgs[i].size();
}
+ this->stats.actor_queue_depth = this->GetNumQueuedMessages();
//create the message reply object
GetStatsMessage message;
diff --git a/lib/gras_impl/stats.hpp b/lib/gras_impl/stats.hpp
index d9e2341..a1b165a 100644
--- a/lib/gras_impl/stats.hpp
+++ b/lib/gras_impl/stats.hpp
@@ -42,6 +42,7 @@ struct BlockStats
std::vector<time_ticks_t> outputs_idle;
//instantaneous port status
+ size_t actor_queue_depth;
std::vector<size_t> items_enqueued;
std::vector<size_t> msgs_enqueued;
std::vector<size_t> tags_enqueued;
diff --git a/lib/top_block_query.cpp b/lib/top_block_query.cpp
index 3203507..a20704f 100644
--- a/lib/top_block_query.cpp
+++ b/lib/top_block_query.cpp
@@ -115,6 +115,7 @@ static std::string query_stats(ElementImpl *self, const boost::property_tree::pt
block.put("total_time_post", stats.total_time_post);
block.put("total_time_input", stats.total_time_input);
block.put("total_time_output", stats.total_time_output);
+ block.put("actor_queue_depth", stats.actor_queue_depth);
#define my_block_ptree_append(l) { \
boost::property_tree::ptree e; \
for (size_t i = 0; i < stats.l.size(); i++) { \
diff --git a/python/gras/query/chart_total_io_counts.js b/python/gras/query/chart_total_io_counts.js
index 2aa8a84..597de71 100644
--- a/python/gras/query/chart_total_io_counts.js
+++ b/python/gras/query/chart_total_io_counts.js
@@ -65,4 +65,7 @@ GrasChartTotalIoCounts.prototype.update = function(point)
}
});
});
+
+ var actor_depth = block_data.actor_queue_depth;
+ if (actor_depth > 1) make_entry('Actor depth', actor_depth.toString() + ' msgs');
}