• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

llnl / dftracer-utils / 28286012595

27 Jun 2026 10:04AM UTC coverage: 51.056% (-1.3%) from 52.356%
28286012595

Pull #79

github

web-flow
Merge 6c6535a19 into 8eb383f39
Pull Request #79: Add Valgrind memory checking (C++, Python, MPI) and fix the bugs it found

32079 of 80165 branches covered (40.02%)

Branch coverage included in aggregate %.

129 of 149 new or added lines in 11 files covered. (86.58%)

5116 existing lines in 181 files now uncovered.

32739 of 46790 relevant lines covered (69.97%)

9929.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.96
/src/dftracer/utils/utilities/common/json/parser.cpp
1
#include <dftracer/utils/utilities/common/json/parser.h>
2

3
namespace dftracer::utils::utilities::common::json {
4

5
JsonParser::JsonParser(std::size_t capacity) : parser_(capacity) {}
342✔
6

7
bool JsonParser::parse(std::string_view json_line) {
5,774✔
8
    padded_json_ = simdjson::padded_string(json_line);
5,774✔
9
    auto result = parser_.iterate(padded_json_);
5,774✔
10
    if (result.error()) {
5,774!
11
        valid_ = false;
×
12
        return false;
×
13
    }
14
    doc_ = std::move(result.value());
5,774✔
15
    active_ = simdjson::ondemand::document_reference(doc_);
5,774✔
16
    valid_ = true;
5,774✔
17
    return true;
5,774✔
18
}
5,774✔
19

20
bool JsonParser::parse_padded(simdjson::padded_string_view json) {
×
21
    auto result = parser_.iterate(json);
×
22
    if (result.error()) {
×
23
        valid_ = false;
×
24
        return false;
×
25
    }
26
    doc_ = std::move(result.value());
×
27
    active_ = simdjson::ondemand::document_reference(doc_);
×
28
    valid_ = true;
×
29
    return true;
×
UNCOV
30
}
×
31

32
void JsonParser::rewind() {
912✔
33
    if (valid_) {
912!
34
        active_.rewind();
912✔
35
    }
912✔
36
}
912✔
37

38
std::optional<std::int64_t> JsonParser::get_int64(std::string_view key) {
×
39
    if (!valid_) return std::nullopt;
×
40
    auto result = active_[key].get_int64();
×
41
    if (result.error()) return std::nullopt;
×
42
    return result.value();
×
UNCOV
43
}
×
44

45
std::optional<std::uint64_t> JsonParser::get_uint64(std::string_view key) {
424✔
46
    if (!valid_) return std::nullopt;
424!
47
    auto result = active_[key].get_uint64();
424✔
48
    if (result.error()) return std::nullopt;
424!
49
    return result.value();
424✔
50
}
424✔
51

52
std::optional<double> JsonParser::get_double(std::string_view key) {
×
53
    if (!valid_) return std::nullopt;
×
54
    auto result = active_[key].get_double();
×
55
    if (result.error()) return std::nullopt;
×
56
    return result.value();
×
UNCOV
57
}
×
58

59
std::optional<bool> JsonParser::get_bool(std::string_view key) {
×
60
    if (!valid_) return std::nullopt;
×
61
    auto result = active_[key].get_bool();
×
62
    if (result.error()) return std::nullopt;
×
63
    return result.value();
×
UNCOV
64
}
×
65

66
std::optional<std::string_view> JsonParser::get_string(std::string_view key) {
922✔
67
    if (!valid_) return std::nullopt;
922!
68
    auto result = active_[key].get_string();
922✔
69
    if (result.error()) return std::nullopt;
922✔
70
    return result.value();
920✔
71
}
922✔
72

73
}  // namespace dftracer::utils::utilities::common::json
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc