}
uint8_t* frame = (uint8_t*)malloc(data.length()); // NOLINT: it's the API
if (frame == nullptr) {
- ++d_queueFullDrops; // XXX separate count?
+ ++d_tooLargeCount;
return Result::TooLarge;
}
memcpy(frame, data.c_str(), data.length());
{
return Stats{.d_queued = d_framesSent,
.d_pipeFull = d_queueFullDrops,
- .d_tooLarge = 0,
+ .d_tooLarge = d_tooLargeCount,
.d_otherError = d_permanentFailures};
}
struct fstrm_iothr* d_iothr{nullptr};
std::atomic<uint64_t> d_framesSent{0};
std::atomic<uint64_t> d_queueFullDrops{0};
+ std::atomic<uint64_t> d_tooLargeCount{0};
std::atomic<uint64_t> d_permanentFailures{0};
void cleanup();