| 1087 | } |
| 1088 | |
| 1089 | void RuntimeProfileBase::AddInfoStringInternal( |
| 1090 | const string& key, string value, bool append, bool redact) { |
| 1091 | if (redact) Redact(&value); |
| 1092 | |
| 1093 | StripTrailingWhitespace(&value); |
| 1094 | |
| 1095 | lock_guard<SpinLock> l(info_strings_lock_); |
| 1096 | InfoStrings::iterator it = info_strings_.find(key); |
| 1097 | if (it == info_strings_.end()) { |
| 1098 | info_strings_.emplace(key, std::move(value)); |
| 1099 | info_strings_display_order_.push_back(key); |
| 1100 | } else { |
| 1101 | if (append) { |
| 1102 | it->second += ", " + std::move(value); |
| 1103 | } else { |
| 1104 | it->second = std::move(value); |
| 1105 | } |
| 1106 | } |
| 1107 | } |
| 1108 | |
| 1109 | void RuntimeProfile::UpdateInfoString(const string& key, string value) { |
| 1110 | lock_guard<SpinLock> l(info_strings_lock_); |
no test coverage detected