100 tasks from the HWE arm-linux code-gen pool (outside the lk/man/pth range given to batch 22), each with at least one independent contract-edge defect and plain public docs. Claude reviewed 100/100 USABLE against current digests; no ID or source overlap with main or batch 22. Difficulty is unmeasured. progress.md records the wrap-up: all Codex sessions and Qwen schedulers stopped for the user's rollout, Qwen results so far (57 HARD of 373), and what is left on each batch branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
2.0 KiB
C++
73 lines
2.0 KiB
C++
#include "durable.hpp"
|
|
namespace durable {
|
|
int Domain::writer_info(int id, WriterInfo &out) const
|
|
{
|
|
const auto found = writers_.find(id);
|
|
if (found == writers_.end()) {
|
|
return -2;
|
|
}
|
|
const Writer &writer = found->second;
|
|
WriterInfo result;
|
|
result.id = writer.id;
|
|
result.generation = writer.generation;
|
|
result.topic = writer.topic;
|
|
result.durability = writer.durability;
|
|
result.depth = writer.depth;
|
|
result.published = writer.published;
|
|
const auto retained = histories_.read(id, writer.generation);
|
|
result.retained = static_cast<Number>(retained.size());
|
|
out = result;
|
|
return 0;
|
|
}
|
|
int Domain::reader_info(int id, ReaderInfo &out) const
|
|
{
|
|
const auto found = readers_.find(id);
|
|
if (found == readers_.end()) {
|
|
return -2;
|
|
}
|
|
const Reader &reader = found->second;
|
|
ReaderInfo result;
|
|
result.id = reader.id;
|
|
result.topic = reader.topic;
|
|
result.durability = reader.durability;
|
|
result.capacity = reader.capacity;
|
|
result.received = reader.received;
|
|
result.taken = reader.taken;
|
|
result.lost = reader.lost;
|
|
result.queued = static_cast<Number>(reader.queue.size());
|
|
out = result;
|
|
return 0;
|
|
}
|
|
void Domain::writer_ids(std::vector<int> &out) const
|
|
{
|
|
std::vector<int> result;
|
|
result.reserve(writers_.size());
|
|
for (const auto &item : writers_) {
|
|
result.push_back(item.first);
|
|
}
|
|
out.swap(result);
|
|
}
|
|
void Domain::reader_ids(std::vector<int> &out) const
|
|
{
|
|
std::vector<int> result;
|
|
result.reserve(readers_.size());
|
|
for (const auto &item : readers_) {
|
|
result.push_back(item.first);
|
|
}
|
|
out.swap(result);
|
|
}
|
|
Totals Domain::totals() const
|
|
{
|
|
Totals result;
|
|
result.writers = static_cast<Number>(writers_.size());
|
|
result.readers = static_cast<Number>(readers_.size());
|
|
result.retained = histories_.count();
|
|
result.queued = 0;
|
|
for (const auto &item : readers_) {
|
|
result.queued += static_cast<Number>(item.second.queue.size());
|
|
}
|
|
result.next_sequence = next_sequence_;
|
|
return result;
|
|
}
|
|
}
|