diff --git a/src/hydra-queue-runner/build-result.cc b/src/hydra-queue-runner/build-result.cc index 73bf79f0..aa98acbb 100644 --- a/src/hydra-queue-runner/build-result.cc +++ b/src/hydra-queue-runner/build-result.cc @@ -147,7 +147,11 @@ BuildOutput getBuildOutput( continue; BuildMetric metric; metric.name = fields[0]; - metric.value = atof(fields[1].c_str()); // FIXME + try { + metric.value = std::stod(fields[1]); + } catch (...) { + continue; // skip this metric + } metric.unit = fields.size() >= 3 ? fields[2] : ""; if (!std::regex_match(metric.unit, std::regex("[a-zA-Z0-9._%-]+"))) metric.unit = "";