0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ProfileDataScanner.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3
9  * of the License.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
26 
27 #ifndef Hypertable_Lib_ProfileDataScanner_h
28 #define Hypertable_Lib_ProfileDataScanner_h
29 
30 #include <Common/Serializable.h>
31 
32 #include <cstdint>
33 #include <set>
34 #include <string>
35 
36 namespace Hypertable {
37 
40 
44  public:
45 
50 
55 
58  std::string to_string();
59 
61  int32_t subscanners {};
62 
64  int32_t scanblocks {};
65 
67  int64_t cells_scanned {};
68 
70  int64_t cells_returned {};
71 
73  int64_t bytes_scanned {};
74 
76  int64_t bytes_returned {};
77 
79  int64_t disk_read {};
80 
82  std::set<std::string> servers;
83 
84  private:
85 
86  uint8_t encoding_version() const override;
87 
88  size_t encoded_length_internal() const override;
89 
90  void encode_internal(uint8_t **bufp) const override;
91 
92  void decode_internal(uint8_t version, const uint8_t **bufp,
93  size_t *remainp) override;
94 
95  };
96 
98 }
99 
100 #endif // Hypertable_Lib_ProfileDataScanner_h
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.
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_internal(uint8_t **bufp) const override
Writes serialized representation of object to a buffer.
std::string to_string()
Returns human-readible string describing profile data.
ProfileDataScanner & operator-=(const ProfileDataScanner &other)
Subtracts profile data from another object.
Declarations for Serializable.
Hypertable definitions
void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized representation of object from a buffer.
Mixin class that provides a standard serialization interface.
Definition: Serializable.h:65
int64_t cells_scanned
Number of cell scanned while executing scan.
int64_t cells_returned
Number of cell returned while executing scan.
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.