44 if (!servers.empty()) {
45 for (
auto &
str : servers)
60 if (!servers.empty()) {
61 for (
auto &
str : servers)
69 subscanners = (int32_t)
decode_i32(bufp, remainp);
70 scanblocks = (int32_t)
decode_i32(bufp, remainp);
71 cells_scanned = (int64_t)
decode_i64(bufp, remainp);
72 cells_returned = (int64_t)
decode_i64(bufp, remainp);
73 bytes_scanned = (int64_t)
decode_i64(bufp, remainp);
74 bytes_returned = (int64_t)
decode_i64(bufp, remainp);
75 disk_read = (int64_t)
decode_i64(bufp, remainp);
76 size_t count = (size_t)
decode_i32(bufp, remainp);
77 for (
size_t i=0; i<count; i++)
102 for (
auto &server : other.
servers)
103 servers.erase(server);
108 string str =
"{ProfileDataScanner: ";
109 str += string(
"cells_scanned=") + cells_scanned +
" ";
110 str += string(
"cells_returned=") + cells_returned +
" ";
111 str += string(
"bytes_scanned=") + bytes_scanned +
" ";
112 str += string(
"bytes_returned=") + bytes_returned +
" ";
113 str += string(
"disk_read=") + disk_read +
" ";
114 str += string(
"subscanners=") + subscanners +
" ";
115 str += string(
"scanblocks=") + scanblocks +
" ";
116 str += string(
"servers=");
118 for (
auto & server : servers) {
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
int32_t scanblocks
Number of scan blocks returned from RangeServers.
ProfileDataScanner & operator+=(const ProfileDataScanner &other)
Adds profile data from another object.
int32_t subscanners
Number of RangeServer::create_scanner() calls.
int64_t bytes_scanned
Number of bytes scanned while executing scan.
Po::typed_value< String > * str(String *v=0)
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
uint64_t decode_i64(const uint8_t **bufp, size_t *remainp)
Decode a 64-bit integer in little-endian order.
Declarations for ProfileDataScanner.
std::set< std::string > servers
Set of server proxy names participating in scan.
int64_t disk_read
Number of bytes read from disk while executing scan.
void encode_i32(uint8_t **bufp, uint32_t val)
Encode a 32-bit integer in little-endian order.
Compatibility Macros for C/C++.
void encode_internal(uint8_t **bufp) const override
Writes serialized representation of object to a buffer.
void encode_i64(uint8_t **bufp, uint64_t val)
Encode a 64-bit integer in little-endian order.
Functions to serialize/deserialize primitives to/from a memory buffer.
std::string to_string()
Returns human-readible string describing profile data.
ProfileDataScanner & operator-=(const ProfileDataScanner &other)
Subtracts profile data from another object.
void encode_vstr(uint8_t **bufp, const void *buf, size_t len)
Encode a buffer as variable length string (vint64, data, null)
void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized representation of object from a buffer.
int64_t cells_scanned
Number of cell scanned while executing scan.
int64_t cells_returned
Number of cell returned while executing scan.
String extensions and helpers: sets, maps, append operators etc.
int64_t bytes_returned
Number of bytes returned while executing scan.
uint8_t encoding_version() const override
Returns encoding version.
size_t encoded_length_internal() const override
Returns internal serialized length.