summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_block.h
diff options
context:
space:
mode:
authorTom Rondeau2013-01-25 16:35:26 -0500
committerTom Rondeau2013-02-07 17:05:13 -0500
commit8b425118da3a09e490486b83a91208d2530d9897 (patch)
tree39c2e50ef7d1be8726eb0059d5ba40fadb3d8beb /gnuradio-core/src/lib/runtime/gr_block.h
parent30b4428b23dad07c74381d790ff67dffa948aa40 (diff)
downloadgnuradio-8b425118da3a09e490486b83a91208d2530d9897.tar.gz
gnuradio-8b425118da3a09e490486b83a91208d2530d9897.tar.bz2
gnuradio-8b425118da3a09e490486b83a91208d2530d9897.zip
sched: adding in perf counters to measure performance of blocks during exectution of flowgraph.
Conflicts: CMakeLists.txt gnuradio-core/src/lib/runtime/gr_block.cc gnuradio-core/src/lib/runtime/gr_block_detail.cc gnuradio-core/src/lib/runtime/gr_block_detail.h
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_block.h')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index 9906d3632..c9d2d8f53 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -358,6 +358,44 @@ class GR_CORE_API gr_block : public gr_basic_block {
d_min_output_buffer[port] = min_output_buffer;
}
+ // --------------- Performance counter functions -------------
+
+ /*!
+ * \brief Gets average noutput_items performance counter.
+ */
+ float pc_noutput_items();
+
+ /*!
+ * \brief Gets average num items produced performance counter.
+ */
+ float pc_nproduced();
+
+ /*!
+ * \brief Gets average average fullness of \p which input buffer.
+ */
+ float pc_input_buffers_full(int which);
+
+ /*!
+ * \brief Gets average fullness of all input buffers.
+ */
+ std::vector<float> pc_input_buffers_full();
+
+ /*!
+ * \brief Gets average fullness of \p which input buffer.
+ */
+ float pc_output_buffers_full(int which);
+
+ /*!
+ * \brief Gets average fullness of all output buffers.
+ */
+ std::vector<float> pc_output_buffers_full();
+
+ /*!
+ * \brief Gets average clock cycles spent in work.
+ */
+ float pc_work_time();
+
+
// ----------------------------------------------------------------------------
// Functions to handle thread affinity