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

llnl / dftracer-utils / 24057299873

07 Apr 2026 12:01AM UTC coverage: 52.076% (+0.8%) from 51.228%
24057299873

push

github

rayandrew
feat(rocksdb): migrate SQLite indexing to RocksDB

Replace SQLite-backed indexing and provenance storage with RocksDB-backed stores.

  Key changes:
  - add RocksDB async/database/db-manager/filesystem/key-codec layers
  - migrate index and provenance databases from SQLite to RocksDB
  - update index builder, trace reader, reorganize, view, stats, and comparator paths for
  RocksDB
  - harden transaction atomicity and rollback behavior with TransactionScope
  - add iterator status checking for prefix scans
  - harden gzip/tar indexer cache state and metadata handling
  - capture executor context in RocksDB awaitables
  - clean up failed RocksDB open paths and manager lifecycle behavior
  - vendor CPM 0.42.1 and update CI/build integration
  - refresh docs, Python bindings, and C++/Python test coverage for the new backend

  Validation:
  - full test suite passed
  - Ubuntu 22.04 Docker run passed
  - focused RocksDB/indexer regression tests passed.

24097 of 59624 branches covered (40.41%)

Branch coverage included in aggregate %.

2516 of 3144 new or added lines in 75 files covered. (80.03%)

72 existing lines in 15 files now uncovered.

20858 of 26701 relevant lines covered (78.12%)

14113.43 hits per line

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

44.3
/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>(
172✔
11
    std::string_view name) {
12
    std::string key(name);
172!
13
    const char* value = std::getenv(key.c_str());
172!
14
    if (value == nullptr || value[0] == '\0') {
172!
15
        return std::nullopt;
172✔
16
    }
NEW
17
    return std::string_view(value);
×
18
}
172✔
19

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

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

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

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

NEW
48
        if (*configured == -1 || *configured > 0) {
×
NEW
49
            return *configured;
×
50
        }
NEW
51
        return default_max_open_files;
×
52
    }();
5,576!
53

54
    return cached_value;
11,336✔
55
}
56

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