json.encode and json.decode finished. Also lots of refactoring.

This commit is contained in:
2022-06-06 23:03:26 -04:00
parent f03a48b0a6
commit 779d9e20b8
11 changed files with 1292 additions and 109 deletions

View File

@@ -87,12 +87,12 @@ void IdGlobalPool::deserialize(StreamBuffer *sb) {
eng::string IdGlobalPool::debug_string() const {
eng::ostringstream oss;
oss << "next_batch:" << util::hex64() << next_batch_ << " ";
oss << "next_id:" << util::hex64() << next_id_ << " ";
oss << "next_seqno: " << util::hex64() << next_seqno_ << " ";
oss << "next_batch:" << util::hex64.val(next_batch_) << " ";
oss << "next_id:" << util::hex64.val(next_id_) << " ";
oss << "next_seqno: " << util::hex64.val(next_seqno_) << " ";
oss << "salvaged:";
for (const int64_t val : salvaged_) {
oss << " " << util::hex64() << val;
oss << " " << util::hex64.val(val);
}
return oss.str();
}
@@ -253,9 +253,9 @@ eng::string IdPlayerPool::debug_string() const {
oss << "cap:" << fifo_capacity_ << " ids:";
for (int i = 0; i < int(ranges_.size()); i++) {
if (i > 0) oss << ",";
oss << util::hex64() << ranges_[i];
oss << util::hex64.val(ranges_[i]);
}
oss << " seqno:" << util::hex64() << next_seqno_;
oss << " seqno:" << util::hex64.val(next_seqno_);
return oss.str();
}