0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd::db: Improve readability.

This commit is contained in:
Jason Volk 2019-07-16 15:52:52 -07:00
parent e0e9e09e67
commit 4b53217939

View file

@ -7113,18 +7113,18 @@ ircd::db::debug(const rocksdb::WriteBatch &batch)
(const mutable_buffer &ret) (const mutable_buffer &ret)
{ {
return snprintf(data(ret), size(ret)+1, return snprintf(data(ret), size(ret)+1,
"%d deltas; size: %zuB :%s%s%s%s%s%s%s%s%s", "%d deltas; size:%zuB %s+%s+%s+%s+%s+%s+%s+%s+%s",
batch.Count(), batch.Count(),
batch.GetDataSize(), batch.GetDataSize(),
batch.HasPut()? " PUT" : "", batch.HasPut()? "PUT" : "",
batch.HasDelete()? " DELETE" : "", batch.HasDelete()? "DEL" : "",
batch.HasSingleDelete()? " SINGLE_DELETE" : "", batch.HasSingleDelete()? "SDL" : "",
batch.HasDeleteRange()? " DELETE_RANGE" : "", batch.HasDeleteRange()? "DRG" : "",
batch.HasMerge()? " MERGE" : "", batch.HasMerge()? "MRG" : "",
batch.HasBeginPrepare()? " BEGIN_PREPARE" : "", batch.HasBeginPrepare()? "BEG" : "",
batch.HasEndPrepare()? " END_PREPARE" : "", batch.HasEndPrepare()? "END" : "",
batch.HasCommit()? " COMMIT" : "", batch.HasCommit()? "COM-" : "",
batch.HasRollback()? " ROLLBACK" : ""); batch.HasRollback()? "RB^" : "");
}); });
} }