Skip to content

Commit 86ab088

Browse files
committed
Standardised foreach_report, stream_report and future_overhead_report, and made minor changes to perftests ci
Signed-off-by: Vedant <[email protected]>
1 parent 2575d63 commit 86ab088

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

.jenkins/lsu-perftests/launch_perftests.sh

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ hpx_targets=(
1616
hpx_test_options=(
1717
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
1818
--hpx:threads=4 --vector_size=104857 --work_delay=1 \
19-
--chunk_size=0 --test_count=200"
19+
--chunk_size=0 --test_count=200 --detailed_bench"
2020
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
2121
--hpx:queuing=local-priority --hpx:threads=4 --test-all \
22-
--repetitions=40 --futures=207270"
22+
--repetitions=40 --futures=207270 --detailed_bench"
2323
"--hpx:ini=hpx.thread_queue.init_threads_count=100 \
2424
--vector_size=518176 --hpx:threads=4 --iterations=200 \
25-
--warmup_iterations=20")
25+
--warmup_iterations=20 --detailed_bench")
2626

2727
# Build binaries for performance tests
2828
${perftests_dir}/driver.py -v -l $logfile build -b release -o build \

libs/core/algorithms/tests/performance/foreach_report.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ int hpx_main(hpx::program_options::variables_map& vm)
4141
disable_stealing = vm.count("disable_stealing");
4242
fast_idle_mode = vm.count("fast_idle_mode");
4343

44+
hpx::util::perftests_init(vm);
45+
4446
// verify that input is within domain of program
4547
if (test_count == 0 || test_count < 0)
4648
{
@@ -122,6 +124,7 @@ int main(int argc, char* argv[])
122124
;
123125
// clang-format on
124126

127+
hpx::util::perftests_cfg(cmdline);
125128
hpx::local::init_params init_args;
126129
init_args.desc_cmdline = cmdline;
127130
init_args.cfg = {"hpx.os_threads=all"};

libs/core/testing/src/performance.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ average: {{average(elapsed)}}{{^-last}}
120120
int outputs = 0;
121121
for (auto&& item : obj.m_map)
122122
{
123+
long double average = static_cast<long double>(0.0);
123124
if (outputs)
124125
strm << ",";
125126
strm << "\n {\n";
126-
strm << R"( "name" : ")" << std::get<0>(item.first)
127+
strm << R"( "name": ")" << std::get<0>(item.first)
127128
<< "\",\n";
128-
strm << R"( "executor" : ")" << std::get<1>(item.first)
129+
strm << R"( "executor": ")" << std::get<1>(item.first)
129130
<< "\",\n";
130-
strm << R"( "series" : [)"
131+
strm << R"( "series": [)"
131132
<< "\n";
132133
int series = 0;
133134
strm.precision(
@@ -140,10 +141,11 @@ average: {{average(elapsed)}}{{^-last}}
140141
}
141142
strm << R"( )" << std::scientific << val;
142143
++series;
144+
average += val;
143145
}
144-
145-
strm << "\n ]\n";
146-
146+
strm << "\n ],\n";
147+
strm << std::scientific << R"( "average": )"<< average / series
148+
<< "\n";
147149
strm << " }";
148150
++outputs;
149151
}

tests/performance/local/future_overhead_report.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ int hpx_main(variables_map& vm)
165165
num_iterations = vm["delay-iterations"].as<std::uint64_t>();
166166

167167
const std::uint64_t count = vm["futures"].as<std::uint64_t>();
168+
169+
hpx::util::perftests_init(vm);
170+
168171
if (HPX_UNLIKELY(0 == count))
169172
throw std::logic_error("error: count of 0 futures specified\n");
170173

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

203206
// Initialize and run HPX.
207+
hpx::util::perftests_cfg(cmdline);
204208
hpx::local::init_params init_args;
205209
init_args.desc_cmdline = cmdline;
206210

tests/performance/local/stream_report.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ int hpx_main(hpx::program_options::variables_map& vm)
442442
std::size_t iterations = vm["iterations"].as<std::size_t>();
443443
std::size_t warmup_iterations = vm["warmup_iterations"].as<std::size_t>();
444444
std::size_t chunk_size = vm["chunk_size"].as<std::size_t>();
445+
hpx::util::perftests_init(vm);
445446
std::size_t executor;
446447
header = vm.count("header") > 0;
447448

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

552+
hpx::util::perftests_cfg(cmdline);
551553
hpx::init_params init_args;
552554
init_args.desc_cmdline = cmdline;
553555
init_args.cfg = cfg;

0 commit comments

Comments
 (0)