From d1735360bc7bfb04be56f2b255a0b84b4db31b84 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 15 Feb 2013 16:24:39 -0500 Subject: core: adding variance calcs to perf. counters. Using running mean/variance algorithm from Knuth's Art of Computer Programming. --- gnuradio-core/src/lib/runtime/gr_block.h | 41 +++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (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 bd9ff42df..6e21d5b97 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.h +++ b/gnuradio-core/src/lib/runtime/gr_block.h @@ -382,36 +382,75 @@ class GR_CORE_API gr_block : public gr_basic_block { */ float pc_noutput_items(); + /*! + * \brief Gets variance of noutput_items performance counter. + */ + float pc_noutput_items_var(); + /*! * \brief Gets average num items produced performance counter. */ float pc_nproduced(); /*! - * \brief Gets average average fullness of \p which input buffer. + * \brief Gets variance of num items produced performance counter. + */ + float pc_nproduced_var(); + + /*! + * \brief Gets average fullness of \p which input buffer. */ float pc_input_buffers_full(int which); + /*! + * \brief Gets variance of fullness of \p which input buffer. + */ + float pc_input_buffers_full_var(int which); + /*! * \brief Gets average fullness of all input buffers. */ std::vector pc_input_buffers_full(); + /*! + * \brief Gets variance of fullness of all input buffers. + */ + std::vector pc_input_buffers_full_var(); + /*! * \brief Gets average fullness of \p which input buffer. */ float pc_output_buffers_full(int which); + /*! + * \brief Gets variance of fullness of \p which input buffer. + */ + float pc_output_buffers_full_var(int which); + /*! * \brief Gets average fullness of all output buffers. */ std::vector pc_output_buffers_full(); + /*! + * \brief Gets variance of fullness of all output buffers. + */ + std::vector pc_output_buffers_full_var(); /*! * \brief Gets average clock cycles spent in work. */ float pc_work_time(); + /*! + * \brief Gets average clock cycles spent in work. + */ + float pc_work_time_var(); + + /*! + * \brief Resets the performance counters + */ + void reset_perf_counters(); + // ---------------------------------------------------------------------------- // Functions to handle thread affinity -- cgit