Skip to content

Commit

Permalink
#2171: Update LBDataHolder::toJson to correctly store user defined data
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Oct 24, 2023
1 parent a756ae5 commit d97a5c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vt/vrt/collection/balance/lb_data_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ std::unique_ptr<nlohmann::json> LBDataHolder::toJson(PhaseType phase) const {
}
}

if (user_per_phase_json_.find(phase) != user_per_phase_json_.end()) {
auto& user_def_this_phase = user_per_phase_json_.at(phase);

if (!user_def_this_phase->empty()) {
j["user_defined"] = *user_def_this_phase;
}
}

return std::make_unique<json>(std::move(j));
}

Expand Down

0 comments on commit d97a5c9

Please sign in to comment.