30 #ifndef GOOGLE_DATAFLOW_API_MEM_INFO_H_ 31 #define GOOGLE_DATAFLOW_API_MEM_INFO_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/strings/stringpiece.h" 52 class MemInfo :
public client::JsonCppData {
66 explicit MemInfo(
const Json::Value& storage);
73 explicit MemInfo(Json::Value* storage);
86 return StringPiece(
"google_dataflow_api::MemInfo");
95 return Storage().isMember(
"currentLimitBytes");
102 MutableStorage()->removeMember(
"currentLimitBytes");
110 const Json::Value& storage = Storage(
"currentLimitBytes");
111 return client::JsonValueToCppValueHelper<uint64 >(storage);
122 client::SetJsonValueFromCppValueHelper<uint64 >(
123 value, MutableStorage(
"currentLimitBytes"));
132 return Storage().isMember(
"currentRssBytes");
139 MutableStorage()->removeMember(
"currentRssBytes");
147 const Json::Value& storage = Storage(
"currentRssBytes");
148 return client::JsonValueToCppValueHelper<uint64 >(storage);
159 client::SetJsonValueFromCppValueHelper<uint64 >(
160 value, MutableStorage(
"currentRssBytes"));
169 return Storage().isMember(
"timestamp");
176 MutableStorage()->removeMember(
"timestamp");
184 const Json::Value& v = Storage(
"timestamp");
185 if (v == Json::Value::null)
return StringPiece(
"");
186 return StringPiece(v.asCString());
197 *MutableStorage(
"timestamp") = value.data();
206 return Storage().isMember(
"totalGbMs");
213 MutableStorage()->removeMember(
"totalGbMs");
221 const Json::Value& storage = Storage(
"totalGbMs");
222 return client::JsonValueToCppValueHelper<uint64 >(storage);
233 client::SetJsonValueFromCppValueHelper<uint64 >(
234 value, MutableStorage(
"totalGbMs"));
238 void operator=(
const MemInfo&);
241 #endif // GOOGLE_DATAFLOW_API_MEM_INFO_H_ void clear_total_gb_ms()
Definition: mem_info.h:212
void clear_current_limit_bytes()
Definition: mem_info.h:101
uint64 get_current_rss_bytes() const
Definition: mem_info.h:146
const StringPiece get_timestamp() const
Definition: mem_info.h:183
void set_total_gb_ms(uint64 value)
Definition: mem_info.h:232
void clear_timestamp()
Definition: mem_info.h:175
void clear_current_rss_bytes()
Definition: mem_info.h:138
Definition: mem_info.h:52
Definition: approximate_progress.h:40
uint64 get_total_gb_ms() const
Definition: mem_info.h:220
void set_current_limit_bytes(uint64 value)
Definition: mem_info.h:121
void set_current_rss_bytes(uint64 value)
Definition: mem_info.h:158
const StringPiece GetTypeName() const
Definition: mem_info.h:85
void set_timestamp(const StringPiece &value)
Definition: mem_info.h:196
bool has_total_gb_ms() const
Definition: mem_info.h:205
Definition: approximate_progress.cc:42
bool has_current_rss_bytes() const
Definition: mem_info.h:131
uint64 get_current_limit_bytes() const
Definition: mem_info.h:109
bool has_timestamp() const
Definition: mem_info.h:168
bool has_current_limit_bytes() const
Definition: mem_info.h:94