diff options
| author | Martin Braun <martin.braun@ettus.com> | 2016-03-18 18:10:49 -0700 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2016-03-21 14:07:42 -0700 | 
| commit | c3b01cb670c01463658861bd9ed6ffd65da3c52b (patch) | |
| tree | c60a2ab7dcaf8767ddc023e509956de360eb526b | |
| parent | f045ee5199f50df8876fd943d7cc7572df22a28c (diff) | |
| download | uhd-c3b01cb670c01463658861bd9ed6ffd65da3c52b.tar.gz uhd-c3b01cb670c01463658861bd9ed6ffd65da3c52b.tar.bz2 uhd-c3b01cb670c01463658861bd9ed6ffd65da3c52b.zip  | |
examples: Add timeouts to benchmark_rate
| -rw-r--r-- | host/examples/benchmark_rate.cpp | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index bf3015119..e7abf76b3 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -46,6 +46,7 @@ unsigned long long num_rx_samps = 0;  unsigned long long num_tx_samps = 0;  unsigned long long num_dropped_samps = 0;  unsigned long long num_seq_errors = 0; +unsigned long long num_timeouts = 0;  /***********************************************************************   * Benchmark RX Rate @@ -126,6 +127,10 @@ void benchmark_rx_rate(              if (burst_timer_elapsed) {                  return;              } +            std::cerr << "Receiver error: " << md.strerror() << ", continuing..." << std::endl; +            num_timeouts++; +            break; +              // Otherwise, it's an error          default:              std::cerr << "Receiver error: " << md.strerror() << std::endl; @@ -421,7 +426,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){          "  Num transmitted samples: %u\n"          "  Num sequence errors:     %u\n"          "  Num underflows detected: %u\n" -    ) % num_rx_samps % num_dropped_samps % num_overflows % num_tx_samps % num_seq_errors % num_underflows << std::endl; +        "  Num timeouts:            %u\n" +    ) % num_rx_samps % num_dropped_samps +      % num_overflows % num_tx_samps +      % num_seq_errors % num_underflows +      % num_timeouts << std::endl;      //finished      std::cout << std::endl << "Done!" << std::endl << std::endl;  | 
