Commit 9bab7b4 1 parent ae7478d commit 9bab7b4 Copy full SHA for 9bab7b4
File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,10 @@ std::string PerfTestHarness::OutputMemoryUse() const {
235
235
auto const node = per_node_mem.first ;
236
236
auto const & memory_use = per_node_mem.second ;
237
237
238
+ if (memory_use.empty ()){
239
+ continue ;
240
+ }
241
+
238
242
std::size_t cur_min = std::numeric_limits<std::size_t >::max ();
239
243
std::size_t cur_max = 0 ;
240
244
@@ -317,12 +321,16 @@ void PerfTestHarness::DumpResults() {
317
321
);
318
322
319
323
auto const time_file_data = OutputTimeResults ();
320
- auto const memory_file = OutputMemoryUse ();
321
-
322
324
if (gen_file_) {
323
- OutputToFile (fmt::format (" {}_mem" , name_), memory_file);
324
325
OutputToFile (fmt::format (" {}_time" , name_), time_file_data);
325
326
}
327
+
328
+ if (print_memory_use_) {
329
+ auto const memory_file = OutputMemoryUse ();
330
+ if (gen_file_) {
331
+ OutputToFile (fmt::format (" {}_mem" , name_), memory_file);
332
+ }
333
+ }
326
334
}
327
335
}
328
336
@@ -443,6 +451,7 @@ void PerfTestHarness::SpinScheduler() {
443
451
void PerfTestHarness::GetMemoryUsage () {
444
452
// Memory footprint from PerfTestHarness' internal data structs are included
445
453
memory_use_[current_run_].push_back (mem_tracker_.getUsage ());
454
+ print_memory_use_ = true ;
446
455
}
447
456
448
457
}}}} // namespace vt::tests::perf::common
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ struct PerfTestHarness : TestHarnessBase {
174
174
protected:
175
175
bool gen_file_ = false ;
176
176
bool verbose_ = false ;
177
+ bool print_memory_use_ = false ;
177
178
uint32_t num_runs_ = 20 ;
178
179
uint32_t current_run_ = 0 ;
179
180
std::vector<char *> custom_args_ = {};
You can’t perform that action at this time.
0 commit comments