Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 859F1200C37 for ; Sun, 19 Mar 2017 21:53:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 84286160B7D; Sun, 19 Mar 2017 20:53:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CBD08160B6D for ; Sun, 19 Mar 2017 21:53:54 +0100 (CET) Received: (qmail 57922 invoked by uid 500); 19 Mar 2017 20:53:54 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 57913 invoked by uid 99); 19 Mar 2017 20:53:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2017 20:53:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EAC33184962 for ; Sun, 19 Mar 2017 20:53:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.569 X-Spam-Level: X-Spam-Status: No, score=-3.569 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id hTXZxvE1rTEJ for ; Sun, 19 Mar 2017 20:53:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 6620F5F238 for ; Sun, 19 Mar 2017 20:53:51 +0000 (UTC) Received: (qmail 57910 invoked by uid 99); 19 Mar 2017 20:53:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2017 20:53:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B8B37DFF36; Sun, 19 Mar 2017 20:53:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jianqiao@apache.org To: commits@quickstep.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-quickstep git commit: Enhanced the execution DAG visualization Date: Sun, 19 Mar 2017 20:53:50 +0000 (UTC) archived-at: Sun, 19 Mar 2017 20:53:55 -0000 Repository: incubator-quickstep Updated Branches: refs/heads/master 4ad6cec7b -> b9016a89b Enhanced the execution DAG visualization - Added number of work orders per operator. - Added mean time per work order for each operator. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/b9016a89 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/b9016a89 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/b9016a89 Branch: refs/heads/master Commit: b9016a89b2255d923788d14867d083d6c2959558 Parents: 4ad6cec Author: Harshad Deshmukh Authored: Sat Mar 18 12:40:47 2017 -0500 Committer: Harshad Deshmukh Committed: Sun Mar 19 00:58:39 2017 -0500 ---------------------------------------------------------------------- utility/ExecutionDAGVisualizer.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/b9016a89/utility/ExecutionDAGVisualizer.cpp ---------------------------------------------------------------------- diff --git a/utility/ExecutionDAGVisualizer.cpp b/utility/ExecutionDAGVisualizer.cpp index 2938808..dd34796 100644 --- a/utility/ExecutionDAGVisualizer.cpp +++ b/utility/ExecutionDAGVisualizer.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -114,6 +115,8 @@ void ExecutionDAGVisualizer::bindProfilingStats( std::vector time_elapsed(num_nodes_, 0); std::size_t overall_start_time = std::numeric_limits::max(); std::size_t overall_end_time = 0; + std::unordered_map workorders_count; + std::unordered_map mean_time_per_workorder; for (const auto &entry : execution_time_records) { const std::size_t relop_index = entry.operator_id; DCHECK_LT(relop_index, num_nodes_); @@ -128,6 +131,16 @@ void ExecutionDAGVisualizer::bindProfilingStats( time_end[relop_index] = std::max(time_end[relop_index], workorder_end_time); time_elapsed[relop_index] += (workorder_end_time - workorder_start_time); + + if (workorders_count.find(relop_index) == workorders_count.end()) { + workorders_count[relop_index] = 0; + } + ++workorders_count[relop_index]; + if (mean_time_per_workorder.find(relop_index) == + mean_time_per_workorder.end()) { + mean_time_per_workorder[relop_index] = 0; + } + mean_time_per_workorder[relop_index] += workorder_end_time - workorder_start_time; } double total_time_elapsed = 0; @@ -176,6 +189,20 @@ void ExecutionDAGVisualizer::bindProfilingStats( static_cast(relop_elapsed_time) / (relop_end_time - relop_start_time); node_info.labels.emplace_back( "effective concurrency: " + FormatDigits(concurrency, 2)); + + DCHECK(workorders_count.find(node_index) != workorders_count.end()); + const std::size_t workorders_count_for_node = workorders_count.at(node_index); + if (workorders_count_for_node > 0) { + mean_time_per_workorder[node_index] = + mean_time_per_workorder[node_index] / + (1000 * static_cast(workorders_count_for_node)); + } else { + mean_time_per_workorder[node_index] = 0; + } + node_info.labels.emplace_back(std::to_string(workorders_count_for_node) + " work orders"); + node_info.labels.emplace_back( + "Mean work order execution time: " + + FormatDigits(mean_time_per_workorder[node_index], 2) + " ms"); } } }