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

llnl / dftracer-utils / 28423703495

30 Jun 2026 05:59AM UTC coverage: 51.998% (-0.3%) from 52.278%
28423703495

Pull #83

github

web-flow
Merge fb542a938 into 2efed6649
Pull Request #83: refactor and improve code QoL

37282 of 93303 branches covered (39.96%)

Branch coverage included in aggregate %.

801 of 1525 new or added lines in 78 files covered. (52.52%)

98 existing lines in 37 files now uncovered.

33674 of 43157 relevant lines covered (78.03%)

20306.85 hits per line

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

95.0
/src/dftracer/utils/python/indexer_checkpoint.cpp
1
#include <dftracer/utils/python/indexer_checkpoint.h>
2
#include <dftracer/utils/python/py_type_helpers.h>
3
#include <structmember.h>
4

5
PyObject *IndexerCheckpoint_new(PyTypeObject *type, PyObject *args,
170✔
6
                                PyObject *kwds) {
7
    IndexerCheckpointObject *self;
8
    self = (IndexerCheckpointObject *)type->tp_alloc(type, 0);
170✔
9
    if (self != NULL) {
170✔
10
        memset(&self->checkpoint, 0, sizeof(dft_indexer_checkpoint_t));
170✔
11
    }
85✔
12
    return (PyObject *)self;
170✔
13
}
14

15
static void IndexerCheckpoint_dealloc(IndexerCheckpointObject *self) {
170✔
16
    free(self->checkpoint.dict_compressed);
170✔
17
    self->checkpoint.dict_compressed = NULL;
170✔
18
    Py_TYPE(self)->tp_free((PyObject *)self);
170✔
19
}
170✔
20

21
#if PY_VERSION_HEX >= 0x030C0000  // >= 3.12
22

23
static PyMemberDef IndexerCheckpoint_members[] = {
24
    {"checkpoint_idx", Py_T_ULONGLONG,
25
     offsetof(IndexerCheckpointObject, checkpoint.checkpoint_idx), 0,
26
     "Checkpoint index"},
27
    {"uc_offset", Py_T_ULONGLONG,
28
     offsetof(IndexerCheckpointObject, checkpoint.uc_offset), 0,
29
     "Uncompressed offset"},
30
    {"uc_size", Py_T_ULONGLONG,
31
     offsetof(IndexerCheckpointObject, checkpoint.uc_size), 0,
32
     "Uncompressed size"},
33
    {"c_offset", Py_T_ULONGLONG,
34
     offsetof(IndexerCheckpointObject, checkpoint.c_offset), 0,
35
     "Compressed offset"},
36
    {"c_size", Py_T_ULONGLONG,
37
     offsetof(IndexerCheckpointObject, checkpoint.c_size), 0,
38
     "Compressed size"},
39
    {"bits", Py_T_UINT, offsetof(IndexerCheckpointObject, checkpoint.bits), 0,
40
     "Bit position"},
41
    {"num_lines", Py_T_ULONGLONG,
42
     offsetof(IndexerCheckpointObject, checkpoint.num_lines), 0,
43
     "Number of lines in this chunk"},
44
    {NULL} /* Sentinel */
45
};
46

47
#else
48

49
static PyMemberDef IndexerCheckpoint_members[] = {
50
    {"checkpoint_idx", T_ULONGLONG,
51
     offsetof(IndexerCheckpointObject, checkpoint.checkpoint_idx), 0,
52
     "Checkpoint index"},
53
    {"uc_offset", T_ULONGLONG,
54
     offsetof(IndexerCheckpointObject, checkpoint.uc_offset), 0,
55
     "Uncompressed offset"},
56
    {"uc_size", T_ULONGLONG,
57
     offsetof(IndexerCheckpointObject, checkpoint.uc_size), 0,
58
     "Uncompressed size"},
59
    {"c_offset", T_ULONGLONG,
60
     offsetof(IndexerCheckpointObject, checkpoint.c_offset), 0,
61
     "Compressed offset"},
62
    {"c_size", T_ULONGLONG,
63
     offsetof(IndexerCheckpointObject, checkpoint.c_size), 0,
64
     "Compressed size"},
65
    {"bits", T_UINT, offsetof(IndexerCheckpointObject, checkpoint.bits), 0,
66
     "Bit position"},
67
    {"num_lines", T_ULONGLONG,
68
     offsetof(IndexerCheckpointObject, checkpoint.num_lines), 0,
69
     "Number of lines in this chunk"},
70
    {NULL} /* Sentinel */
71
};
72

73
#endif
74

75
PyTypeObject IndexerCheckpointType = {
76
    PyVarObject_HEAD_INIT(NULL, 0) "indexer.IndexerCheckpoint", /* tp_name */
77
    sizeof(IndexerCheckpointObject),       /* tp_basicsize */
78
    0,                                     /* tp_itemsize */
79
    (destructor)IndexerCheckpoint_dealloc, /* tp_dealloc */
80
    0,                                     /* tp_vectorcall_offset */
81
    0,                                     /* tp_getattr */
82
    0,                                     /* tp_setattr */
83
    0,                                     /* tp_as_async */
84
    0,                                     /* tp_repr */
85
    0,                                     /* tp_as_number */
86
    0,                                     /* tp_as_sequence */
87
    0,                                     /* tp_as_mapping */
88
    0,                                     /* tp_hash */
89
    0,                                     /* tp_call */
90
    0,                                     /* tp_str */
91
    0,                                     /* tp_getattro */
92
    0,                                     /* tp_setattro */
93
    0,                                     /* tp_as_buffer */
94
    Py_TPFLAGS_DEFAULT,                    /* tp_flags */
95
    "IndexerCheckpoint objects",           /* tp_doc */
96
    0,                                     /* tp_traverse */
97
    0,                                     /* tp_clear */
98
    0,                                     /* tp_richcompare */
99
    0,                                     /* tp_weaklistoffset */
100
    0,                                     /* tp_iter */
101
    0,                                     /* tp_iternext */
102
    0,                                     /* tp_methods */
103
    IndexerCheckpoint_members,             /* tp_members */
104
    0,                                     /* tp_getset */
105
    0,                                     /* tp_base */
106
    0,                                     /* tp_dict */
107
    0,                                     /* tp_descr_get */
108
    0,                                     /* tp_descr_set */
109
    0,                                     /* tp_dictoffset */
110
    0,                                     /* tp_init */
111
    0,                                     /* tp_alloc */
112
    IndexerCheckpoint_new,                 /* tp_new */
113
};
114

115
int init_indexer_checkpoint(PyObject *m) {
2✔
116
    if (register_type(m, &IndexerCheckpointType, "IndexerCheckpoint") < 0)
2✔
UNCOV
117
        return -1;
×
118

119
    return 0;
2✔
120
}
1✔
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