James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 1 | #include <Thresholds.hpp> |
| 2 | #include <VariantVisitors.hpp> |
| 3 | #include <boost/algorithm/string/replace.hpp> |
| 4 | #include <boost/lexical_cast.hpp> |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 5 | #include <cmath> |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 6 | #include <fstream> |
| 7 | #include <iostream> |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 8 | #include <sensor.hpp> |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 9 | |
| 10 | static constexpr bool DEBUG = false; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 11 | static constexpr size_t maxThresholds = 4; |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 12 | |
| 13 | namespace thresholds |
| 14 | { |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 15 | unsigned int toBusValue(const Level& level) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 16 | { |
| 17 | switch (level) |
| 18 | { |
| 19 | case (Level::WARNING): |
| 20 | { |
| 21 | return 0; |
| 22 | } |
| 23 | case (Level::CRITICAL): |
| 24 | { |
| 25 | return 1; |
| 26 | } |
| 27 | default: |
| 28 | { |
| 29 | return -1; |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 34 | std::string toBusValue(const Direction& direction) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 35 | { |
| 36 | switch (direction) |
| 37 | { |
| 38 | case (Direction::LOW): |
| 39 | { |
| 40 | return "less than"; |
| 41 | } |
| 42 | case (Direction::HIGH): |
| 43 | { |
| 44 | return "greater than"; |
| 45 | } |
| 46 | default: |
| 47 | { |
| 48 | return "err"; |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 53 | bool parseThresholdsFromConfig( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 54 | const SensorData& sensorData, |
| 55 | std::vector<thresholds::Threshold>& thresholdVector, |
| 56 | const std::string* matchLabel) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 57 | { |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 58 | for (const auto& item : sensorData) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 59 | { |
| 60 | if (item.first.find("Thresholds") == std::string::npos) |
| 61 | { |
| 62 | continue; |
| 63 | } |
| 64 | if (matchLabel != nullptr) |
| 65 | { |
| 66 | auto labelFind = item.second.find("Label"); |
| 67 | if (labelFind == item.second.end()) |
| 68 | continue; |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 69 | if (std::visit(VariantToStringVisitor(), labelFind->second) != |
| 70 | *matchLabel) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 71 | continue; |
| 72 | } |
| 73 | auto directionFind = item.second.find("Direction"); |
| 74 | auto severityFind = item.second.find("Severity"); |
| 75 | auto valueFind = item.second.find("Value"); |
| 76 | if (valueFind == item.second.end() || |
| 77 | severityFind == item.second.end() || |
| 78 | directionFind == item.second.end()) |
| 79 | { |
| 80 | std::cerr << "Malformed threshold in configuration\n"; |
| 81 | return false; |
| 82 | } |
| 83 | Level level; |
| 84 | Direction direction; |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 85 | if (std::visit(VariantToUnsignedIntVisitor(), severityFind->second) == |
| 86 | 0) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 87 | { |
| 88 | level = Level::WARNING; |
| 89 | } |
| 90 | else |
| 91 | { |
| 92 | level = Level::CRITICAL; |
| 93 | } |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 94 | if (std::visit(VariantToStringVisitor(), directionFind->second) == |
| 95 | "less than") |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 96 | { |
| 97 | direction = Direction::LOW; |
| 98 | } |
| 99 | else |
| 100 | { |
| 101 | direction = Direction::HIGH; |
| 102 | } |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 103 | float val = std::visit(VariantToFloatVisitor(), valueFind->second); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 104 | |
| 105 | thresholdVector.emplace_back(level, direction, val); |
| 106 | } |
| 107 | return true; |
| 108 | } |
| 109 | |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 110 | void persistThreshold(const std::string& path, const std::string& baseInterface, |
| 111 | const thresholds::Threshold& threshold, |
| 112 | std::shared_ptr<sdbusplus::asio::connection>& conn) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 113 | { |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 114 | for (int ii = 0; ii < maxThresholds; ii++) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 115 | { |
| 116 | std::string thresholdInterface = |
| 117 | baseInterface + ".Thresholds" + std::to_string(ii); |
| 118 | conn->async_method_call( |
| 119 | [&, path, threshold, thresholdInterface]( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 120 | const boost::system::error_code& ec, |
| 121 | const boost::container::flat_map<std::string, BasicVariantType>& |
| 122 | result) { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 123 | if (ec) |
| 124 | { |
| 125 | return; // threshold not supported |
| 126 | } |
| 127 | |
| 128 | auto directionFind = result.find("Direction"); |
| 129 | auto severityFind = result.find("Severity"); |
| 130 | auto valueFind = result.find("Value"); |
| 131 | if (valueFind == result.end() || severityFind == result.end() || |
| 132 | directionFind == result.end()) |
| 133 | { |
| 134 | std::cerr << "Malformed threshold in configuration\n"; |
| 135 | return; |
| 136 | } |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 137 | unsigned int level = std::visit(VariantToUnsignedIntVisitor(), |
| 138 | severityFind->second); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 139 | |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 140 | std::string dir = |
| 141 | std::visit(VariantToStringVisitor(), directionFind->second); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 142 | if ((toBusValue(threshold.level) != level) || |
| 143 | (toBusValue(threshold.direction) != dir)) |
| 144 | { |
| 145 | return; // not the droid we're looking for |
| 146 | } |
| 147 | |
James Feist | 3eb8262 | 2019-02-08 13:10:22 -0800 | [diff] [blame] | 148 | std::variant<double> value(threshold.value); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 149 | conn->async_method_call( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 150 | [](const boost::system::error_code& ec) { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 151 | if (ec) |
| 152 | { |
| 153 | std::cerr << "Error setting threshold " << ec |
| 154 | << "\n"; |
| 155 | } |
| 156 | }, |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 157 | entityManagerName, path, "org.freedesktop.DBus.Properties", |
| 158 | "Set", thresholdInterface, "Value", value); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 159 | }, |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 160 | entityManagerName, path, "org.freedesktop.DBus.Properties", |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 161 | "GetAll", thresholdInterface); |
| 162 | } |
| 163 | } |
| 164 | |
Jae Hyun Yoo | 95b8a2d | 2019-02-25 20:15:09 -0800 | [diff] [blame^] | 165 | void updateThresholds(Sensor* sensor) |
| 166 | { |
| 167 | if (sensor->thresholds.empty()) |
| 168 | { |
| 169 | return; |
| 170 | } |
| 171 | |
| 172 | for (const auto& threshold : sensor->thresholds) |
| 173 | { |
| 174 | std::shared_ptr<sdbusplus::asio::dbus_interface> interface; |
| 175 | std::string property; |
| 176 | if (threshold.level == thresholds::Level::CRITICAL) |
| 177 | { |
| 178 | interface = sensor->thresholdInterfaceCritical; |
| 179 | if (threshold.direction == thresholds::Direction::HIGH) |
| 180 | { |
| 181 | property = "CriticalHigh"; |
| 182 | } |
| 183 | else |
| 184 | { |
| 185 | property = "CriticalLow"; |
| 186 | } |
| 187 | } |
| 188 | else if (threshold.level == thresholds::Level::WARNING) |
| 189 | { |
| 190 | interface = sensor->thresholdInterfaceWarning; |
| 191 | if (threshold.direction == thresholds::Direction::HIGH) |
| 192 | { |
| 193 | property = "WarningHigh"; |
| 194 | } |
| 195 | else |
| 196 | { |
| 197 | property = "WarningLow"; |
| 198 | } |
| 199 | } |
| 200 | else |
| 201 | { |
| 202 | continue; |
| 203 | } |
| 204 | if (!interface) |
| 205 | { |
| 206 | continue; |
| 207 | } |
| 208 | interface->set_property(property, threshold.value); |
| 209 | } |
| 210 | } |
| 211 | |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 212 | bool checkThresholds(Sensor* sensor) |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 213 | { |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 214 | bool status = true; |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 215 | |
| 216 | if (sensor->thresholds.empty()) |
| 217 | { |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 218 | return true; |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 219 | } |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 220 | for (auto& threshold : sensor->thresholds) |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 221 | { |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 222 | if (std::isnan(sensor->value)) |
| 223 | { |
| 224 | threshold.asserted = false; |
| 225 | } |
| 226 | else if (threshold.direction == thresholds::Direction::HIGH) |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 227 | { |
| 228 | if (sensor->value > threshold.value && !threshold.asserted) |
| 229 | { |
| 230 | assertThresholds(sensor, threshold.level, threshold.direction, |
| 231 | true); |
| 232 | threshold.asserted = true; |
| 233 | } |
| 234 | else if (sensor->value <= threshold.value && threshold.asserted) |
| 235 | { |
| 236 | assertThresholds(sensor, threshold.level, threshold.direction, |
| 237 | false); |
| 238 | threshold.asserted = false; |
| 239 | } |
| 240 | } |
| 241 | else |
| 242 | { |
| 243 | if (sensor->value < threshold.value && !threshold.asserted) |
| 244 | { |
| 245 | assertThresholds(sensor, threshold.level, threshold.direction, |
| 246 | true); |
| 247 | threshold.asserted = true; |
| 248 | } |
| 249 | else if (sensor->value >= threshold.value && threshold.asserted) |
| 250 | { |
| 251 | assertThresholds(sensor, threshold.level, threshold.direction, |
| 252 | false); |
| 253 | threshold.asserted = false; |
| 254 | } |
| 255 | } |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 256 | if (threshold.level == thresholds::Level::CRITICAL && |
| 257 | threshold.asserted) |
| 258 | { |
| 259 | status = false; |
| 260 | } |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 261 | } |
James Feist | dc6c55f | 2018-10-31 12:53:20 -0700 | [diff] [blame] | 262 | return status; |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 263 | } |
| 264 | |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 265 | void assertThresholds(Sensor* sensor, thresholds::Level level, |
James Feist | 251c782 | 2018-09-12 12:54:15 -0700 | [diff] [blame] | 266 | thresholds::Direction direction, bool assert) |
| 267 | { |
| 268 | std::string property; |
| 269 | std::shared_ptr<sdbusplus::asio::dbus_interface> interface; |
| 270 | if (level == thresholds::Level::WARNING && |
| 271 | direction == thresholds::Direction::HIGH) |
| 272 | { |
| 273 | property = "WarningAlarmHigh"; |
| 274 | interface = sensor->thresholdInterfaceWarning; |
| 275 | } |
| 276 | else if (level == thresholds::Level::WARNING && |
| 277 | direction == thresholds::Direction::LOW) |
| 278 | { |
| 279 | property = "WarningAlarmLow"; |
| 280 | interface = sensor->thresholdInterfaceWarning; |
| 281 | } |
| 282 | else if (level == thresholds::Level::CRITICAL && |
| 283 | direction == thresholds::Direction::HIGH) |
| 284 | { |
| 285 | property = "CriticalAlarmHigh"; |
| 286 | interface = sensor->thresholdInterfaceCritical; |
| 287 | } |
| 288 | else if (level == thresholds::Level::CRITICAL && |
| 289 | direction == thresholds::Direction::LOW) |
| 290 | { |
| 291 | property = "CriticalAlarmLow"; |
| 292 | interface = sensor->thresholdInterfaceCritical; |
| 293 | } |
| 294 | else |
| 295 | { |
| 296 | std::cerr << "Unknown threshold, level " << level << "direction " |
| 297 | << direction << "\n"; |
| 298 | return; |
| 299 | } |
| 300 | if (!interface) |
| 301 | { |
| 302 | std::cout << "trying to set uninitialized interface\n"; |
| 303 | return; |
| 304 | } |
| 305 | interface->set_property(property, assert); |
| 306 | } |
| 307 | |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 308 | static constexpr std::array<const char*, 4> attrTypes = {"lcrit", "min", "max", |
| 309 | "crit"}; |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 310 | |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 311 | bool parseThresholdsFromAttr( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 312 | std::vector<thresholds::Threshold>& thresholdVector, |
| 313 | const std::string& inputPath, const double& scaleFactor) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 314 | { |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 315 | for (auto& type : attrTypes) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 316 | { |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 317 | auto attrPath = boost::replace_all_copy(inputPath, "input", type); |
| 318 | std::ifstream attrFile(attrPath); |
| 319 | if (!attrFile.good()) |
| 320 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 321 | continue; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 322 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 323 | std::string attr; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 324 | std::getline(attrFile, attr); |
| 325 | attrFile.close(); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 326 | |
| 327 | Level level; |
| 328 | Direction direction; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 329 | double val = std::stod(attr) / scaleFactor; |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 330 | if (type == "min" || type == "max") |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 331 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 332 | level = Level::WARNING; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 333 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 334 | else |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 335 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 336 | level = Level::CRITICAL; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 337 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 338 | if (type == "min" || type == "lcrit") |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 339 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 340 | direction = Direction::LOW; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 341 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 342 | else |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 343 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 344 | direction = Direction::HIGH; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 345 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 346 | |
| 347 | if (DEBUG) |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 348 | { |
| 349 | std::cout << "Threshold: " << attrPath << ": " << val << "\n"; |
| 350 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 351 | |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 352 | thresholdVector.emplace_back(level, direction, val); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 353 | } |
| 354 | // no thresholds is allowed, not an error so return true always |
| 355 | return true; |
| 356 | } |
| 357 | |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 358 | bool hasCriticalInterface( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 359 | const std::vector<thresholds::Threshold>& thresholdVector) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 360 | { |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 361 | for (auto& threshold : thresholdVector) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 362 | { |
| 363 | if (threshold.level == Level::CRITICAL) |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 364 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 365 | return true; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 366 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 367 | } |
| 368 | return false; |
| 369 | } |
| 370 | |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 371 | bool hasWarningInterface( |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 372 | const std::vector<thresholds::Threshold>& thresholdVector) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 373 | { |
James Feist | d870587 | 2019-02-08 13:26:09 -0800 | [diff] [blame] | 374 | for (auto& threshold : thresholdVector) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 375 | { |
| 376 | if (threshold.level == Level::WARNING) |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 377 | { |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 378 | return true; |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 379 | } |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 380 | } |
| 381 | return false; |
| 382 | } |
| 383 | } // namespace thresholds |