| 1891 | } |
| 1892 | |
| 1893 | void Coordinator::BackendsToJson(Document* doc) { |
| 1894 | DCHECK(exec_rpcs_complete_.Load()) << "Exec() must be called first"; |
| 1895 | Value states(kArrayType); |
| 1896 | { |
| 1897 | lock_guard<SpinLock> l(backend_states_init_lock_); |
| 1898 | for (BackendState* state : backend_states_) { |
| 1899 | Value val(kObjectType); |
| 1900 | state->ToJson(&val, doc); |
| 1901 | states.PushBack(val, doc->GetAllocator()); |
| 1902 | } |
| 1903 | } |
| 1904 | doc->AddMember("backend_states", states, doc->GetAllocator()); |
| 1905 | } |
| 1906 | |
| 1907 | void Coordinator::FInstanceStatsToJson(Document* doc) { |
| 1908 | DCHECK(exec_rpcs_complete_.Load()) << "Exec() must be called first"; |
no test coverage detected