[ 
https://issues.apache.org/jira/browse/DRILL-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883713#comment-15883713
 ] 

ASF GitHub Bot commented on DRILL-5260:
---------------------------------------

Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/753#discussion_r103052249
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/test/ProfileParser.java ---
    @@ -138,9 +414,208 @@ public long getMetric(int id) {
         }
       }
     
    -  public Map<Integer,OpInfo> getOpInfo( ) {
    +  /**
    +   * Information about an operator definition: the plan-time information
    +   * that appears in the plan portion of the profile. Also holds the
    +   * "actuals" from the minor fragment portion of the profile.
    +   * Allows integrating the "planned" vs. "actual" performance of the
    +   * query.
    +   */
    +
    +  public static class OpDefInfo {
    +    public String opName;
    +    public boolean isInferred;
    +    public int majorId;
    +    public int stepId;
    +    public String args;
    +    public List<FieldDef> columns;
    +    public int globalLevel;
    +    public int localLevel;
    +    public int id;
    +    public int branchId;
    +    public boolean isBranchRoot;
    +    public double estMemoryCost;
    +    public double estNetCost;
    +    public double estIOCost;
    +    public double estCpuCost;
    +    public double estRowCost;
    +    public double estRows;
    +    public String name;
    +    public long actualMemory;
    +    public int actualBatches;
    +    public long actualRows;
    +    public OpDefInfo inferredParent;
    +    public List<OperatorProfile> opExecs = new ArrayList<>( );
    +    public List<OpDefInfo> children = new ArrayList<>( );
    +
    +    // 00-00    Screen : rowType = RecordType(VARCHAR(10) Year, 
VARCHAR(65536) Month, VARCHAR(100) Devices, VARCHAR(100) Tier, VARCHAR(100) 
LOB, CHAR(10) Gateway, BIGINT Day, BIGINT Hour, INTEGER Week, VARCHAR(100) 
Week_end_date, BIGINT Usage_Cnt): \
    +    // rowcount = 100.0, cumulative cost = {7.42124276972414E9 rows, 
7.663067406383167E10 cpu, 0.0 io, 2.24645048816E10 network, 2.692766612982188E8 
memory}, id = 129302
    +    //
    +    // 00-01      Project(Year=[$0], Month=[$1], Devices=[$2], Tier=[$3], 
LOB=[$4], Gateway=[$5], Day=[$6], Hour=[$7], Week=[$8], Week_end_date=[$9], 
Usage_Cnt=[$10]) :
    +    // rowType = RecordType(VARCHAR(10) Year, VARCHAR(65536) Month, 
VARCHAR(100) Devices, VARCHAR(100) Tier, VARCHAR(100) LOB, CHAR(10) Gateway, 
BIGINT Day, BIGINT Hour, INTEGER Week, VARCHAR(100) Week_end_date, BIGINT 
Usage_Cnt): rowcount = 100.0, cumulative cost = {7.42124275972414E9 rows, 
7.663067405383167E10 cpu, 0.0 io, 2.24645048816E10 network, 2.692766612982188E8 
memory}, id = 129301
    +
    +    public OpDefInfo(String plan) {
    +      Pattern p = Pattern.compile( 
"^(\\d+)-(\\d+)(\\s+)(\\w+)(?:\\((.*)\\))?\\s*:\\s*(.*)$" );
    +      Matcher m = p.matcher(plan);
    +      if (!m.matches()) {
    +        throw new IllegalStateException( "Could not parse plan: " + plan );
    +      }
    +      majorId = Integer.parseInt(m.group(1));
    +      stepId = Integer.parseInt(m.group(2));
    +      name = m.group(4);
    +      args = m.group(5);
    +      String tail = m.group(6);
    +      String indent = m.group(3);
    +      globalLevel = (indent.length() - 4) / 2;
    +
    +      p = Pattern.compile("rowType = RecordType\\((.*)\\): (rowcount .*)");
    +      m = p.matcher(tail);
    --- End diff --
    
    Discussed offline.


> Refinements to new "Cluster Fixture" test framework
> ---------------------------------------------------
>
>                 Key: DRILL-5260
>                 URL: https://issues.apache.org/jira/browse/DRILL-5260
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.10
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.10
>
>
> Roll-up of a number of enhancements to the cluster fixture framework.
> * Config option to suppress printing of CSV and other output. (Allows 
> printing for single tests, not printing when running from Maven.)
> * Parsing of query profiles to extract plan and run time information.
> * Fix bug in log fixture when enabling logging for a package.
> * Improved ZK support.
> * Set up the new CTTAS default temporary workspace for tests.
> * Revise TestDrillbitResiliance to use the new framework.
> * Revise TestWindowFrame to to use the new framework.
> * Revise TestMergeJoinWithSchemaChanges to use the new framework.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to