| 878 | } |
| 879 | |
| 880 | Coordinator::BackendState::InstanceStats::InstanceStats( |
| 881 | const FInstanceExecParamsPB& exec_params, const TPlanFragment* fragment, |
| 882 | const NetworkAddressPB& address, FragmentStats* fragment_stats, ObjectPool* obj_pool) |
| 883 | : exec_params_(exec_params), fragment_(fragment), profile_(nullptr) { |
| 884 | const string& profile_name = Substitute("Instance $0 (host=$1)", |
| 885 | PrintId(exec_params.instance_id()), NetworkAddressPBToString(address)); |
| 886 | profile_ = RuntimeProfile::Create(obj_pool, profile_name); |
| 887 | profile_->AddInfoString(LAST_REPORT_TIME_DESC, ToStringFromUnixMillis(UnixMillis())); |
| 888 | fragment_stats->root_profile()->AddChild(profile_); |
| 889 | |
| 890 | // Compute total split size and add to profile as "BytesAssigned". |
| 891 | for (const auto& entry : exec_params_.per_node_scan_ranges()) { |
| 892 | for (const ScanRangeParamsPB& scan_range_params : entry.second.scan_ranges()) { |
| 893 | if (!scan_range_params.scan_range().has_hdfs_file_split()) continue; |
| 894 | total_split_size_ += scan_range_params.scan_range().hdfs_file_split().length(); |
| 895 | } |
| 896 | } |
| 897 | RuntimeProfile::Counter* bytes_assigned_counter = |
| 898 | PROFILE_BytesAssigned.Instantiate(profile_); |
| 899 | bytes_assigned_counter->Set(total_split_size_); |
| 900 | if (!FLAGS_gen_experimental_profile) { |
| 901 | (*fragment_stats->bytes_assigned())(total_split_size_); |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | void Coordinator::BackendState::InstanceStats::Update( |
| 906 | const FragmentInstanceExecStatusPB& exec_status, |
nothing calls this directly
no test coverage detected