From 8b425118da3a09e490486b83a91208d2530d9897 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 25 Jan 2013 16:35:26 -0500 Subject: 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 --- gnuradio-core/src/lib/runtime/gr_block.h | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gnuradio-core/src/lib/runtime/gr_block.h') 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 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 pc_output_buffers_full(); + + /*! + * \brief Gets average clock cycles spent in work. + */ + float pc_work_time(); + + // ---------------------------------------------------------------------------- // Functions to handle thread affinity -- cgit