Description
I have a specific problem with simply parsing the output of "memory stats" using the generic command("memory", "stats") call.
I've tried the obvious but it seems complicated with the current functionality.
Would it not be a generic extension to this library to add support for std::variant of supported redis types?
At this moment the current library supports STRING and INTEGER (not BOOL and DOUBLE yet), but that would suffice for most cases. An example output of "memory stats" is given below (which could be mapped to 25 pairs of either <string,long long> or <string,string>, or a single array of std::variant<string,long long>).
Any thoughts on how to approach parsing of "memory stats" with current functionality?
Any thoughts on the proposed support for std::variant?
- "peak.allocated"
- (integer) 18949144
- "total.allocated"
- (integer) 865720
- "startup.allocated"
- (integer) 802984
- "replication.backlog"
- (integer) 0
- "clients.slaves"
- (integer) 0
- "clients.normal"
- (integer) 16986
- "aof.buffer"
- (integer) 0
- "lua.caches"
- (integer) 0
- "overhead.total"
- (integer) 819970
- "keys.count"
- (integer) 0
- "keys.bytes-per-key"
- (integer) 0
- "dataset.bytes"
- (integer) 45750
- "dataset.percentage"
- "72.924636840820312"
- "peak.percentage"
- "4.5686497688293457"
- "allocator.allocated"
- (integer) 994000
- "allocator.active"
- (integer) 1363968
- "allocator.resident"
- (integer) 5042176
- "allocator-fragmentation.ratio"
- "1.3722012042999268"
- "allocator-fragmentation.bytes"
- (integer) 369968
- "allocator-rss.ratio"
- "3.6966967582702637"
- "allocator-rss.bytes"
- (integer) 3678208
- "rss-overhead.ratio"
- "0.63931763172149658"
- "rss-overhead.bytes"
- (integer) -1818624
- "fragmentation"
- "3.9087760448455811"
- "fragmentation.bytes"
- (integer) 2398856