| 444 | } |
| 445 | |
| 446 | void ThreadOverviewUrlCallback(bool include_jvm_threads, |
| 447 | const Webserver::WebRequest& req, Document* document) { |
| 448 | thread_manager->GetThreadOverview(document); |
| 449 | if (!include_jvm_threads) return; |
| 450 | |
| 451 | // Add information about the JVM threads |
| 452 | TGetJvmThreadsInfoRequest request; |
| 453 | request.get_complete_info = false; |
| 454 | TGetJvmThreadsInfoResponse response; |
| 455 | Status status = JniUtil::GetJvmThreadsInfo(request, &response); |
| 456 | if (!status.ok()) { |
| 457 | Value error(Substitute("Couldn't retrieve information about JVM threads: $0", |
| 458 | status.GetDetail()).c_str(), document->GetAllocator()); |
| 459 | document->AddMember("error", error, document->GetAllocator()); |
| 460 | return; |
| 461 | } |
| 462 | Value jvm_threads_val(kObjectType); |
| 463 | jvm_threads_val.AddMember("name", "jvm", document->GetAllocator()); |
| 464 | jvm_threads_val.AddMember("total", response.total_thread_count, |
| 465 | document->GetAllocator()); |
| 466 | jvm_threads_val.AddMember("daemon", response.daemon_thread_count, |
| 467 | document->GetAllocator()); |
| 468 | document->AddMember("jvm-threads", jvm_threads_val, document->GetAllocator()); |
| 469 | } |
| 470 | |
| 471 | void JvmThreadsUrlCallback(const Webserver::WebRequest& req, Document* doc) { |
| 472 | DCHECK(doc != NULL); |
no test coverage detected