Skip to content

Commit

Permalink
add a stresstest tool for rapid connects and disconnects for iiod
Browse files Browse the repository at this point in the history
This is based on an iiod robustness test that Lars did:
dc33705

This cleans things up, adds a few more options.

On 2018R1 release (ZedBoard + FMCOMMS3) would cause kernel panics (Scheduling
while atomic) in a few hours over ethernet.

On 2019 release (same hardware), can run for 3 days, doing 45 context
open/destroy per second. (over 11M in total, & 128k where the open/close
was simultaneous in different threads).

Output looks like:
total: 2d21h31m21s Context : 11510707 (45.99/s), buffers: 57504276 (229.76/s), refills : 287540521 (1148.87/s)
    0        :  128395 ( 1.12%)
  1 - 9   μs :  338154 ( 2.94%)
 10 - 99  μs :  466087 ( 4.05%)
100 - 999 μs : 1155429 (10.04%)
  1 - 9.9 ms : 2774553 (24.10%)
 10 - 99  ms : 6521903 (56.66%)
100 - 999 ms :  125908 ( 1.09%)
over 1 s     :       0 ( 0.00%)

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Feb 24, 2020
1 parent 7608823 commit efc692a
Show file tree
Hide file tree
Showing 2 changed files with 701 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ set(IIO_TESTS_TARGETS iio_genxml iio_info iio_attr iio_readdev iio_reg iio_write

if(PTHREAD_LIBRARIES)
project(iio_adi_xflow_check C)
project(iio_stresstest C)
add_executable(iio_adi_xflow_check iio_adi_xflow_check.c)
add_executable(iio_stresstest iio_stresstest.c)
target_link_libraries(iio_adi_xflow_check iio ${PTHREAD_LIBRARIES})
set(IIO_TESTS_TARGETS ${IIO_TESTS_TARGETS} iio_adi_xflow_check)
target_link_libraries(iio_stresstest iio ${PTHREAD_LIBRARIES})
set(IIO_TESTS_TARGETS ${IIO_TESTS_TARGETS} iio_adi_xflow_check iio_stresstest)

target_link_libraries(iio_readdev ${PTHREAD_LIBRARIES})
target_link_libraries(iio_writedev ${PTHREAD_LIBRARIES})
Expand Down
Loading

0 comments on commit efc692a

Please sign in to comment.