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

llnl / dftracer-utils / 29787659139

20 Jul 2026 11:34PM UTC coverage: 51.578% (-1.1%) from 52.66%
29787659139

Pull #99

github

web-flow
Merge ee805adeb into 06bc84ec9
Pull Request #99: Support CM time_metric (NS/MS/SEC/US) across reader and viz

34832 of 86278 branches covered (40.37%)

Branch coverage included in aggregate %.

1034 of 1319 new or added lines in 30 files covered. (78.39%)

5193 existing lines in 197 files now uncovered.

35349 of 49791 relevant lines covered (70.99%)

9765.54 hits per line

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

48.11
/src/dftracer/utils/utilities/common/query/query.cpp
1
#include <dftracer/utils/utilities/common/query/query.h>
2

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

5
Query::Query(const Query& other)
707✔
6
    : source_(other.source_), fields_(other.fields_) {
707!
7
    auto result = parse(source_);
354!
8
    if (!result) throw QueryParseError(result.error());
354!
9
    root_ = std::move(*result);
354!
10
}
707✔
11

12
Query& Query::operator=(const Query& other) {
×
13
    if (this != &other) {
×
14
        source_ = other.source_;
×
15
        fields_ = other.fields_;
×
16
        auto result = parse(source_);
×
17
        if (!result) throw QueryParseError(result.error());
×
18
        root_ = std::move(*result);
×
19
    }
×
20
    return *this;
×
UNCOV
21
}
×
22

23
dftracer::utils::expected<Query, QueryError> Query::from_string(
294✔
24
    std::string_view input) {
25
    auto result = parse(input);
294✔
26
    if (!result) return dftracer::utils::unexpected(result.error());
294!
27
    return Query(std::move(*result), std::string(input));
289!
28
}
294✔
29

30
bool Query::evaluate(const json::JsonValue& event) const {
4,152✔
31
    return query::evaluate(*root_, event);
4,152✔
32
}
33

34
bool Query::evaluate(const ValueMap& fields) const {
3,193✔
35
    return query::evaluate(*root_, fields);
3,193✔
36
}
37

38
std::string Query::to_string() const { return query::to_string(*root_); }
1✔
39

40
Query parse_or_throw(std::string_view input) {
3✔
41
    auto result = Query::from_string(input);
3✔
42
    if (!result) throw QueryParseError(result.error());
3!
43
    return std::move(*result);
2!
44
}
4✔
45

46
std::optional<Query> try_parse(std::string_view input) {
2✔
47
    auto result = Query::from_string(input);
2✔
48
    if (!result) return std::nullopt;
2✔
49
    return std::move(*result);
1!
50
}
2✔
51

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

© 2026 Coveralls, Inc