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

llnl / dftracer-utils / 23529483807

25 Mar 2026 07:17AM UTC coverage: 48.515% (-1.6%) from 50.098%
23529483807

Pull #57

github

web-flow
Merge 5b1e117ad into 38f9f3616
Pull Request #57: feat(comparator): add pairwise traces comparator

18829 of 49412 branches covered (38.11%)

Branch coverage included in aggregate %.

1584 of 1933 new or added lines in 14 files covered. (81.95%)

3552 existing lines in 135 files now uncovered.

18474 of 27477 relevant lines covered (67.23%)

241072.53 hits per line

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

43.18
/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,
527✔
14
                                              const std::string &idx_path,
15
                                              std::size_t index_ckpt_size) {
16
    ArchiveFormat format = FormatDetector::detect(archive_path);
527✔
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) {
527!
23
        case ArchiveFormat::GZIP:
24
            return std::make_shared<GzipReader>(archive_path, idx_path,
526✔
25
                                                index_ckpt_size);
26

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

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

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

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

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

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