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

llnl / dftracer-utils / 29187058583

12 Jul 2026 09:11AM UTC coverage: 51.324% (-1.4%) from 52.754%
29187058583

Pull #96

github

web-flow
Merge 7e90b76dd into 056c79287
Pull Request #96: fix: consolidate stale-index rebuilds across consumers and fix multi-run breaks

33807 of 84432 branches covered (40.04%)

Branch coverage included in aggregate %.

145 of 152 new or added lines in 16 files covered. (95.39%)

5186 existing lines in 197 files now uncovered.

34558 of 48770 relevant lines covered (70.86%)

10797.15 hits per line

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

55.0
/src/dftracer/utils/core/env.cpp
1
#include <dftracer/utils/core/env.h>
2

3
#include <charconv>
4
#include <cstdlib>
5
#include <string>
6

7
namespace dftracer::utils {
8

9
template <>
10
std::optional<std::string_view> Env::get<std::string_view>(
1,846✔
11
    std::string_view name) {
12
    std::string key(name);
1,846✔
13
    const char* value = std::getenv(key.c_str());
1,846!
14
    if (value == nullptr || value[0] == '\0') {
1,846!
15
        return std::nullopt;
1,845✔
16
    }
17
    return std::string_view(value);
1!
18
}
1,846✔
19

20
template <>
21
std::optional<int> Env::get<int>(std::string_view name) {
106✔
22
    auto value = get<std::string_view>(name);
106✔
23
    if (!value.has_value()) {
106!
24
        return std::nullopt;
106✔
25
    }
26

27
    int parsed = 0;
×
28
    auto* begin = value->data();
×
29
    auto* end = begin + value->size();
×
30
    auto [ptr, ec] = std::from_chars(begin, end, parsed);
×
31
    if (ec != std::errc{} || ptr != end) {
×
32
        return std::nullopt;
×
33
    }
34
    return parsed;
×
35
}
106✔
36

37
int Env::rocksdb_max_open_files() {
6,508✔
38
    static const int cached_value = [] {
6,614!
39
        constexpr int default_max_open_files = 32;
106✔
40
        constexpr std::string_view env_name =
106✔
41
            "DFTRACER_UTILS_ROCKSDB_MAX_OPEN_FILES";
42

43
        auto configured = get<int>(env_name);
106✔
44
        if (!configured.has_value()) {
106!
45
            return default_max_open_files;
106✔
46
        }
47

48
        if (*configured == -1 || *configured > 0) {
×
49
            return *configured;
×
50
        }
51
        return default_max_open_files;
×
52
    }();
106✔
53

54
    return cached_value;
6,508✔
UNCOV
55
}
×
56

57
}  // namespace dftracer::utils
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