MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / getStatus

Function getStatus

src/StatusService.actor.cpp:28–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#include "flow/actorcompiler.h" // This must be the last #include.
27
28std::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
48ACTOR void statusUpdateActor(std::string version,
49 std::string host,

Callers 1

statusUpdateActorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected