aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/benchmark_rate.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tests: Atomicize counters in benchmark_rateAaron Rossetto2022-03-071-10/+10
| | | | | | | | The counters that keep track of overruns, underruns, number of samples transferred, etc., were not atomic. Thus, running benchmark_rate with multiple threads would result in inaccurate statistics being reported at the end of the run. This commit makes those counters atomic variables so that they are updated properly.
* examples: benchmark_rate improvementsmichael-west2022-03-031-95/+124
| | | | | | | - Added support for tx_spb and rx_spb arguments - Fixed TX thread timestamp for single channel Signed-off-by: michael-west <michael.west@ettus.com>
* examples: support multiple streamers in benchmark_rateAndrew Lynch2022-01-101-43/+103
|
* examples: Fix --random option in benchmark_ratemichael-west2020-10-121-5/+11
| | | | | | | | The implementation was not properly configuring the stream command if the --random flag was used. It was especially bad when multiple channels were specified. Signed-off-by: michael-west <michael.west@ettus.com>
* examples: Change benchmark_rate default thread priorityAaron Rossetto2020-03-271-1/+1
| | | | | | | | | | | | | | | | | | This commit modifies the benchmark_rate example to use the operating system's default thread priority, instead of real-time thread priority, by default. UHD 4.0 includes a number of significant improvements to the streaming architecture that allow for best performance to be achieved without having to resort to elevating the process thread priority to real-time. Internal testing shows degraded streaming performance in common use cases (i.e. non-DPDK) when the process thread priority is set to real-time. It should be noted that applications which use DPDK may still experience better performance when the process thread priority is set to real-time. Users may continue to manually override the process thread priority in benchmark_rate using the --priority=high command-line option. The need to elevate the process thread priority will be application- and deployment-dependent.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-6/+6
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* examples: benchmark_rate clean print outmattprost2020-02-041-8/+12
| | | | | | Cleans up the print out for the benchmark rate example. Removes race condition that would cause send and receive initialization messages to interleave to stdout.
* examples: Fix tx timeout caused by initial delayCiro Nishiguchi2020-01-201-3/+4
| | | | | | Using default values, the initial delay for tx is larger than the default timeout of tx_streamer::send. Changing the example to always specify a timeout in send.
* examples: Add options to benchmark_rateMichael West2020-01-021-19/+39
| | | | | | | | - Add option for high or normal thread priority with default set to high - Add rx_delay and tx_delay options to dynamically set start delays (default of 0.25 seconds for TX and 0.05 seconds for RX) Signed-off-by: Michael West <michael.west@ettus.com>
* examples: benchmark_rate dpdk recv/send thread priority elevationmattprost2019-12-201-0/+13
| | | | | | | | | | Improves dpdk streaming performance for benchmark_rate by elevating thread priority of the send and recv threads. It does this conditionally, if use_dpdk=1 was passed in through the command line args. Admittedly, this is not a perfect solution, as it does not account for the case when a dpdk user is utilizing a config file to pass in that information. The scope of this fix does seem appropriate for an example.
* examples: benchmark_rate: Add --rx_spp and --tx_sppMartin Braun2019-11-261-5/+23
| | | | These command line arguments control the spp values used for streaming.
* examples: benchmark_rate: Remove usage of boost::posix_timeMartin Braun2019-11-261-18/+25
| | | | | Replace with std::chrono functions instead, in our effort to reduce Boost footprint.
* examples: Add Rx/Tx stream args parameters to benchmark_rateAaron Rossetto2019-11-261-0/+5
|
* uhd: Remove deprecated objects and methodsMartin Braun2019-11-261-16/+1
| | | | | | | | | This removes the following symbols: - otw_type_t - clock_config_t - Any functions that use those symbols - Non-standard args from examples (e.g., --total-time is deprecated in favour of --duration)
* examples: remove thread priority elevationCiro Nishiguchi2019-10-221-6/+0
| | | | | | | Remove UHD call to elevate thread priority to realtime. Setting all threads to the same realtime priority can cause the threads to not share access to the network interface fairly, which adversely affects operation of the worker threads in UHD.
* examples: bmark_rate: fixup INIT_DELAYBrent Stapleton2019-09-041-3/+6
| | | Fixing accounting for INIT_DELAY in the stream duration
* examples: benchmark_rate: Remove dead store to is_lockedMoritz Fischer2019-02-151-1/+0
| | | | | | | Remove dead store to is_locked. The variable isn't read before being overwritten, so the extra store is useless. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-161-294/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* examples: utils: skip formatting program optionsBrent Stapleton2019-01-161-0/+2
| | | | | | Turning off clang formatting around the program option declarations. clang-format makes them looks bad an unreadable because it thinks the options are function calls or something.
* examples: optimize benchmark_rate start timeBrent Stapleton2019-01-031-3/+3
| | | | | | | | Move the setting of the streaming start times back as late as possible. Currently, there are memory allocations in between setting the time_spec in the TX metadata and actually starting streaming. This will lessen the need for an INIT_DELAY and decrease the probability of late packets.
* utils: fix bmark_rate MIMO synchronizationBrent Stapleton2018-10-121-9/+10
| | | | | | | | | | Fix USRP2 MIMO synchronization in benchmark_rate. When synchronizing N2XXs connected with a MIMO cable, only the master's time needs to be set; the slave will be synchronized automatically. Currently, calling set_time_unknown_pps will attempt to synchronize the slave on the next PPS, which can cause problems since the MIMO cable doesn't propogate a PPS signal.
* examples: Avoid calculating dropped samples for negative offsetsMartin Braun2018-05-031-1/+10
| | | | | | | | | | | | There are cases when the first sample after an overrun has an earlier timestamp than the timestamp of the error package. In this case, benchmark_rate would incorrectly determine the number of dropped samples, causing it to display a very large number. This is not a fix of the negative offset issue, but will avoid displaying overly pessimistic numbers dropped samples. An error message is still displayed when this happens, which aids in debugging this situation.
* examples: Fix sleep duration in benchmark_rateMartin Braun2018-05-031-1/+1
| | | | | | The main thread sleeps while the receiver and transmitter threads are going on. This fixes the calculated time it takes in single-channel scenarios.
* examples: Add failure modes to benchmark_rateMartin Braun2018-05-031-20/+86
| | | | | | | | | | | When too many overruns, underruns, or dropped packets are detected, benchmark_rate will now return EXIT_FAILURE. This allows to use it for automated tests. The thresholds are set very high by default, but can be manually tuned by using new command line arguments: $ benchmark_rate --overrun-threshold 0 # Fail on any number of Os
* examples: Update benchmark_rate (more stats, timestamps)Martin Braun2018-03-141-57/+111
| | | | | | | | - Messages are all timestamped, enables better understanding of the output log - Less usage of Boost - More stats (differentiate between RX and TX timeouts and sequence errors)
* examples: Fix some minor compiler warningsMartin Braun2018-02-191-4/+7
| | | | All warnings reported by MSVC. Mostly related to narrowing conversions.
* uhd: Update license headersMartin Braun2018-02-191-1/+2
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* utils: add set_thread_name API call, move thread_priority to threadAndrej Rode2017-06-291-4/+7
|
* uhd: Replaced many lexical_cast with appropriate C++11 equivalentsMartin Braun2017-06-291-5/+4
|
* examples: Fixed check for setting time on PPS vs. nowMartin Braun2016-09-281-1/+6
|
* examples: Added TX and RX channels args in benchmark_rateDerek Kozel2016-08-291-13/+40
|
* examples: Remove default values for subdevs in benchmark_rateMartin Braun2016-08-031-2/+2
|
* examples: Added tx and rx subdev arguments to benchmark_rateDerek Kozel2016-08-031-0/+12
|
* examples: Fixed unconditional wait for SISO case in benchmark_rateMartin Braun2016-07-221-1/+1
|
* examples: Added late command counter to benchmark_rateMartin Braun2016-07-221-4/+17
|
* examples: Fix RX thread in benchmark_rate example so it exits when EOB is seenmichael-west2016-07-221-2/+8
|
* Merge branch 'maint'Martin Braun2016-05-191-2/+3
|\
| * examples: Increased the reference locking timeout in benchmark_ratePaul David2016-05-171-2/+3
| |
| * examples: Re-enabled better thread interruption in benchmark_rateMartin Braun2016-03-171-32/+126
| | | | | | | | | | | | | | The previous version (using atomic variables) was fine, but didn't work with all the Boost versions we currently support on the 3.9.X release line. This is a slightly less safe, but still sufficient example.
| * Revert "examples: Modified benchmark_rate so thread interrupts cannot cause ↵Martin Braun2016-03-161-120/+32
| | | | | | | | | | | | problems" This reverts commit 8930d853f3ee2ac91fc7fd6b41046ca972da3c3f.
| * examples: Modified benchmark_rate so thread interrupts cannot cause problemsMartin Braun2016-03-141-32/+120
| |
* | examples: Add timeouts to benchmark_rateMartin Braun2016-03-211-1/+10
| |
* | examples: Re-enabled better thread interruption in benchmark_rateMartin Braun2016-03-211-32/+126
| | | | | | | | | | | | | | The previous version (using atomic variables) was fine, but didn't work with all the Boost versions we currently support on the 3.9.X release line. This is a slightly less safe, but still sufficient example.
* | Revert "examples: Modified benchmark_rate so thread interrupts cannot cause ↵Martin Braun2016-03-211-120/+32
| | | | | | | | | | | | problems" This reverts commit 8930d853f3ee2ac91fc7fd6b41046ca972da3c3f.
* | examples: Modified benchmark_rate so thread interrupts cannot cause problemsMartin Braun2016-03-211-32/+120
|/
* Corrected the UHD behavior in the event of a USB disconnectDaulPavid2016-02-121-0/+6
|
* Fixed master-specific warningsNicholas Corgan2015-03-271-1/+1
| | | | | * MinGW: unused parameter warning, MSVC-specific pragma * MSVC: bool narrowing
* examples: Merged benchmark_rate and transport_hammerMartin Braun2014-11-131-13/+51
|
* examples: Whitespace and other cleanupMartin Braun2014-10-281-1/+0
|