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

llnl / dftracer-utils / 26195612357

20 May 2026 11:19PM UTC coverage: 49.859% (-2.3%) from 52.2%
26195612357

push

github

hariharan-devarajan
feat(aggregator): improve system metrics scanning and persistence error handling

16041 of 43831 branches covered (36.6%)

Branch coverage included in aggregate %.

6 of 17 new or added lines in 2 files covered. (35.29%)

1072 existing lines in 104 files now uncovered.

21423 of 31309 relevant lines covered (68.42%)

13054.31 hits per line

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

51.16
/src/dftracer/utils/utilities/reader/internal/reader_factory.cpp
1
#include <dftracer/utils/core/common/format_detector.h>
2
#include <dftracer/utils/core/common/logging.h>
3
#include <dftracer/utils/utilities/indexer/internal/gzip/gzip_indexer.h>
4
#include <dftracer/utils/utilities/indexer/internal/tar/tar_indexer.h>
5
#include <dftracer/utils/utilities/reader/internal/gzip_reader.h>
6
#include <dftracer/utils/utilities/reader/internal/reader_factory.h>
7
#include <dftracer/utils/utilities/reader/internal/tar_reader.h>
8

9
#include <stdexcept>
10

11
namespace dftracer::utils::utilities::reader::internal {
12

13
std::shared_ptr<Reader> ReaderFactory::create(const std::string &archive_path,
478✔
14
                                              const std::string &index_path,
15
                                              std::size_t index_ckpt_size) {
16
    ArchiveFormat format = FormatDetector::detect(archive_path);
478✔
17

18
    DFTRACER_UTILS_LOG_DEBUG(
19
        "ReaderFactory::create_reader - detected format: %d for file: %s",
20
        static_cast<int>(format), archive_path.c_str());
21

22
    switch (format) {
479!
23
        case ArchiveFormat::GZIP:
478✔
24
            return std::make_shared<GzipReader>(archive_path, index_path,
947✔
25
                                                index_ckpt_size);
471✔
26

27
        case ArchiveFormat::TAR_GZ:
1✔
28
            return std::make_shared<TarReader>(archive_path, index_path,
2✔
29
                                               index_ckpt_size);
1✔
30

UNCOV
31
        default:
×
32
            throw std::runtime_error("Unsupported archive format for file: " +
×
33
                                     archive_path);
×
34
    }
35
}
36

37
std::shared_ptr<Reader> ReaderFactory::create(
138✔
38
    std::shared_ptr<dftracer::utils::utilities::indexer::internal::Indexer>
39
        indexer) {
40
    if (!indexer) {
138!
41
        throw std::invalid_argument("Indexer cannot be null");
×
42
    }
43

44
    if (indexer->get_format_type() == ArchiveFormat::TAR_GZ) {
136✔
45
        return std::make_shared<TarReader>(
22!
46
            std::static_pointer_cast<
47
                dftracer::utils::utilities::indexer::internal::tar::TarIndexer>(
22✔
48
                indexer));
11✔
49
    }
50

51
    return std::make_shared<GzipReader>(indexer);
126✔
52
}
53

54
bool ReaderFactory::is_format_supported(ArchiveFormat format) {
×
55
    switch (format) {
×
UNCOV
56
        case ArchiveFormat::GZIP:
×
57
        case ArchiveFormat::TAR_GZ:
58
            return true;
×
UNCOV
59
        default:
×
60
            return false;
×
61
    }
62
}
63
}  // namespace dftracer::utils::utilities::reader::internal
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