| 1014 | struct GetMemoryUsageCmd { |
| 1015 | static const char* name; |
| 1016 | static Future<Reference<ExtMsgReply>> call(Reference<ExtConnection> nmc, |
| 1017 | Reference<ExtMsgQuery> query, |
| 1018 | Reference<ExtMsgReply> reply) { |
| 1019 | reply->addDocument(BSON("process memory usage" |
| 1020 | << ((double)getMemoryUsage() / (1024 * 1024)) << "resident memory usage" |
| 1021 | << ((double)getResidentMemoryUsage() / (1024 * 1024)) << "ok" << 1)); |
| 1022 | return reply; |
| 1023 | } |
| 1024 | }; |
| 1025 | REGISTER_CMD(GetMemoryUsageCmd, "getmemoryusage"); |
| 1026 |
nothing calls this directly
no test coverage detected