Skip to content

Commit

Permalink
Standardised foreach_report, stream_report and future_overhead_report…
Browse files Browse the repository at this point in the history
…, and made minor changes to perftests ci

Signed-off-by: Vedant <[email protected]>
  • Loading branch information
vrnimje committed Jul 3, 2024
1 parent 95c7e5e commit dbed23a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .jenkins/lsu-perftests/launch_perftests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ hpx_targets=(
hpx_test_options=(
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
--hpx:threads=4 --vector_size=104857 --work_delay=1 \
--chunk_size=0 --test_count=200"
--chunk_size=0 --test_count=200 --detailed_bench"
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
--hpx:queuing=local-priority --hpx:threads=4 --test-all \
--repetitions=40 --futures=207270"
--repetitions=40 --futures=207270 --detailed_bench"
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
--vector_size=518176 --hpx:threads=4 --iterations=200 \
--warmup_iterations=20")
--warmup_iterations=20 --detailed_bench")

# Build binaries for performance tests
${perftests_dir}/driver.py -v -l $logfile build -b release -o build \
Expand Down
3 changes: 3 additions & 0 deletions libs/core/algorithms/tests/performance/foreach_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ int hpx_main(hpx::program_options::variables_map& vm)
disable_stealing = vm.count("disable_stealing");
fast_idle_mode = vm.count("fast_idle_mode");

hpx::util::perftests_init(vm);

// verify that input is within domain of program
if (test_count == 0 || test_count < 0)
{
Expand Down Expand Up @@ -122,6 +124,7 @@ int main(int argc, char* argv[])
;
// clang-format on

hpx::util::perftests_cfg(cmdline);
hpx::local::init_params init_args;
init_args.desc_cmdline = cmdline;
init_args.cfg = {"hpx.os_threads=all"};
Expand Down
14 changes: 8 additions & 6 deletions libs/core/testing/src/performance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ average: {{average(elapsed)}}{{^-last}}
int outputs = 0;
for (auto&& item : obj.m_map)
{
long double average = static_cast<long double>(0.0);
if (outputs)
strm << ",";
strm << "\n {\n";
strm << R"( "name" : ")" << std::get<0>(item.first)
strm << R"( "name": ")" << std::get<0>(item.first)
<< "\",\n";
strm << R"( "executor" : ")" << std::get<1>(item.first)
strm << R"( "executor": ")" << std::get<1>(item.first)
<< "\",\n";
strm << R"( "series" : [)"
strm << R"( "series": [)"
<< "\n";
int series = 0;
strm.precision(
Expand All @@ -140,10 +141,11 @@ average: {{average(elapsed)}}{{^-last}}
}
strm << R"( )" << std::scientific << val;
++series;
average += val;
}

strm << "\n ]\n";

strm << "\n ],\n";
strm << std::scientific << R"( "average": )"<< average / series
<< "\n";
strm << " }";
++outputs;
}
Expand Down
4 changes: 4 additions & 0 deletions tests/performance/local/future_overhead_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ int hpx_main(variables_map& vm)
num_iterations = vm["delay-iterations"].as<std::uint64_t>();

const std::uint64_t count = vm["futures"].as<std::uint64_t>();

hpx::util::perftests_init(vm);

if (HPX_UNLIKELY(0 == count))
throw std::logic_error("error: count of 0 futures specified\n");

Expand Down Expand Up @@ -201,6 +204,7 @@ int main(int argc, char* argv[])
// clang-format on

// Initialize and run HPX.
hpx::util::perftests_cfg(cmdline);
hpx::local::init_params init_args;
init_args.desc_cmdline = cmdline;

Expand Down
2 changes: 2 additions & 0 deletions tests/performance/local/stream_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ int hpx_main(hpx::program_options::variables_map& vm)
std::size_t iterations = vm["iterations"].as<std::size_t>();
std::size_t warmup_iterations = vm["warmup_iterations"].as<std::size_t>();
std::size_t chunk_size = vm["chunk_size"].as<std::size_t>();
hpx::util::perftests_init(vm);
std::size_t executor;
header = vm.count("header") > 0;

Expand Down Expand Up @@ -548,6 +549,7 @@ int main(int argc, char* argv[])
"hpx.numa_sensitive=2" // no-cross NUMA stealing
};

hpx::util::perftests_cfg(cmdline);
hpx::init_params init_args;
init_args.desc_cmdline = cmdline;
init_args.cfg = cfg;
Expand Down

0 comments on commit dbed23a

Please sign in to comment.