From 471cdfdf14b8f7fc542d30c300c0150fcc72a0a0 Mon Sep 17 00:00:00 2001 From: q-wertz Date: Thu, 9 Jan 2025 15:10:26 +0100 Subject: [PATCH] Use /dev/zero for disk rate check /dev/random is slow by design and probably a bottleneck in the check. /dev/zero should be faster. --- host/examples/rx_samples_to_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index 76afc82982..c8caeaec43 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -64,7 +64,7 @@ double disk_rate_check(const size_t sample_type_size, boost::filesystem::path(file).parent_path() / boost::filesystem::unique_path(); std::string disk_check_proc_str = - "dd if=/dev/random of=" + temp_file.native() + "dd if=/dev/zero of=" + temp_file.native() + " bs=" + std::to_string(samps_per_buff * channel_count * sample_type_size) + " count=100";