diff --git a/tests/performance/io/disk_io.cpp b/tests/performance/io/disk_io.cpp index f9353c2053961d02ba7115c9d21f39a60e18fcbe..7cd78737a3dd01d8516c31f812673c5e00349cec 100644 --- a/tests/performance/io/disk_io.cpp +++ b/tests/performance/io/disk_io.cpp @@ -32,8 +32,8 @@ int main(int argc, char** argv) { // very simple command line parsing if (argc < 3) { - std::cout << "disk_io <int nrspikes> <int nr_repeats> <file_per_rank (true|false)> [simple_output (false|true)]" << std::endl; - << " Simple performance test runner for the exporter manager" + std::cout << "disk_io <int nrspikes> <int nr_repeats> <file_per_rank (true|false)> [simple_output (false|true)]" + << " Simple performance test runner for the exporter manager" << " It exports nrspikes nr_repeats using the export_manager and will produce" << " the total, mean and std of the time needed to perform the output to disk" << " <file_per_rank> true will produce a single file per mpi rank" @@ -88,9 +88,17 @@ int main(int argc, char** argv) { // Create a set of spikes std::vector<spike_type> spikes; + + // ********************************************************************* + // To have a realworld data set we get the average spikes per number + // and use that to get the nr of 'simulated' neurons, and create idxs + // using this value. + // Also assume that we have only a single second of simulated time + // All spike times should be between 0.0 and 1.0: + unsigned simulated_neurons = spikes_per_rank / 20; for (unsigned idx = 0; idx < spikes_per_rank; ++idx) { - spikes.push_back({ { idx, 0 }, 0.0f + idx }); + spikes.push_back({ { idx % simulated_neurons, 0 }, 0.0f + 1 / ( 0.05 +idx % 20)}); } std::vector<int> timings; @@ -117,7 +125,6 @@ int main(int argc, char** argv) { file << *timings.begin() / double(CLOCKS_PER_SEC) * 1000; for (auto time_entry = timings.begin()++; time_entry < timings.end(); ++time_entry) { - file << "," << *time_entry / double(CLOCKS_PER_SEC) * 1000 ; } file << std::endl; diff --git a/tests/performance/io/disk_io.py b/tests/performance/io/disk_io.py index e8b40b7b8052d10cc5d4a0ab950359ffd4cc84bc..23b41faede063e7aec31565c7e04780d7c5e2023 100644 --- a/tests/performance/io/disk_io.py +++ b/tests/performance/io/disk_io.py @@ -37,6 +37,4 @@ print ( mean ) print ( std ) plt.errorbar(range_nr_rank, mean, yerr=std, fmt='-o') -plt.xscale('log') -plt.yscale('log') plt.show() \ No newline at end of file