diff options
author | Nathan West <nathan.west@okstate.edu> | 2014-10-31 19:08:14 -0500 |
---|---|---|
committer | Nathan West <nathan.west@okstate.edu> | 2014-10-31 19:08:14 -0500 |
commit | fe9bd1d961986fd55f6eb984939344be18cd7605 (patch) | |
tree | 643ed3586970d20264699e93f55d2db3e0503345 /gnuradio-runtime/lib/block.cc | |
parent | 82779dce49e149d9cb5acc4d77937cda59e676bd (diff) |
runtime: add throughput counter
throughput_avg is calculated with a wall clock timer over all items produced.
Diffstat (limited to 'gnuradio-runtime/lib/block.cc')
-rw-r--r-- | gnuradio-runtime/lib/block.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc index a15fb89c85..2cc868e844 100644 --- a/gnuradio-runtime/lib/block.cc +++ b/gnuradio-runtime/lib/block.cc @@ -682,6 +682,16 @@ namespace gr { } } + float + block::pc_throughput_avg() { + if(d_detail) { + return d_detail->pc_throughput_avg(); + } + else { + return 0; + } + } + void block::reset_perf_counters() { |