| 1037 | } |
| 1038 | |
| 1039 | void Coordinator::FragmentStats::AddExecStats() { |
| 1040 | root_profile_->SortChildrenByTotalTime(); |
| 1041 | // These strings are not included in the transposed profile because we have counters. |
| 1042 | if (FLAGS_gen_experimental_profile) return; |
| 1043 | stringstream times_label; |
| 1044 | times_label |
| 1045 | << "min:" << PrettyPrinter::Print( |
| 1046 | accumulators::min(completion_times_), TUnit::TIME_NS) |
| 1047 | << " max:" << PrettyPrinter::Print( |
| 1048 | accumulators::max(completion_times_), TUnit::TIME_NS) |
| 1049 | << " mean: " << PrettyPrinter::Print( |
| 1050 | accumulators::mean(completion_times_), TUnit::TIME_NS) |
| 1051 | << " stddev:" << PrettyPrinter::Print( |
| 1052 | sqrt(accumulators::variance(completion_times_)), TUnit::TIME_NS); |
| 1053 | |
| 1054 | stringstream rates_label; |
| 1055 | rates_label |
| 1056 | << "min:" << PrettyPrinter::Print( |
| 1057 | accumulators::min(rates_), TUnit::BYTES_PER_SECOND) |
| 1058 | << " max:" << PrettyPrinter::Print( |
| 1059 | accumulators::max(rates_), TUnit::BYTES_PER_SECOND) |
| 1060 | << " mean:" << PrettyPrinter::Print( |
| 1061 | accumulators::mean(rates_), TUnit::BYTES_PER_SECOND) |
| 1062 | << " stddev:" << PrettyPrinter::Print( |
| 1063 | sqrt(accumulators::variance(rates_)), TUnit::BYTES_PER_SECOND); |
| 1064 | |
| 1065 | agg_profile_->AddInfoString("completion times", times_label.str()); |
| 1066 | agg_profile_->AddInfoString("execution rates", rates_label.str()); |
| 1067 | agg_profile_->AddInfoString("num instances", lexical_cast<string>(num_instances_)); |
| 1068 | } |
| 1069 | |
| 1070 | void Coordinator::BackendState::ToJson(Value* value, Document* document) { |
| 1071 | unique_lock<mutex> l(lock_); |
no test coverage detected