Skip to content

Commit

Permalink
perf: use single concurrency model for single-threaded tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Sep 24, 2024
1 parent 284878c commit 5b9d51b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/iguana/tests/include/TestAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <hipo4/reader.h>
#include <iguana/algorithms/AlgorithmSequence.h>
#include <iguana/services/GlobalParam.h>

inline int TestAlgorithm(
std::string command,
Expand All @@ -23,6 +24,9 @@ inline int TestAlgorithm(
return 1;
}

// set the concurrency model to single-threaded, for optimal performance
iguana::GlobalConcurrencyModel = "single";

// open the HIPO file; we use 2 readers, one for 'before' (i.e., not passed through iguana), and one for 'after'
// (passed through iguana), so we may compare them
hipo::reader reader_before(data_file.c_str()); // NOTE: not copy-constructable, so make two separate readers
Expand Down

0 comments on commit 5b9d51b

Please sign in to comment.