| 26 | #include "flow/actorcompiler.h" // This must be the last #include. |
| 27 | |
| 28 | std::string getStatus(std::string version, std::string host, int32_t port, uint64_t startTime, std::string id) { |
| 29 | double time = timer() * 1000; |
| 30 | return BSON( |
| 31 | // clang-format off |
| 32 | "name" << "Document Layer" << |
| 33 | "timestamp" << time << |
| 34 | "uptime" << time - startTime << |
| 35 | "version" << version << |
| 36 | "host" << host << |
| 37 | "port" << port << |
| 38 | "id" << id << |
| 39 | "memory_usage" << (long long)getMemoryUsage() << |
| 40 | "resident_size" << (long long)getResidentMemoryUsage() << |
| 41 | "main_thread_cpu_seconds" << getProcessorTimeThread() << |
| 42 | "process_cpu_seconds" << getProcessorTimeProcess() |
| 43 | // clang-format on |
| 44 | ) |
| 45 | .jsonString(); |
| 46 | } |
| 47 | |
| 48 | ACTOR void statusUpdateActor(std::string version, |
| 49 | std::string host, |