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

    https://github.com/apache/drill/pull/216#discussion_r42888927
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java
 ---
    @@ -130,4 +136,48 @@ public void addSummary(TableBuilder tb) {
         tb.appendBytes(Math.round(memSum / size), null);
         tb.appendBytes(peakMem.getLeft().getPeakLocalMemoryAllocated(), null);
       }
    +
    +  public String getMetricsTable() {
    +    final String[] metricNames = 
OperatorMetricRegistry.getMetricNames(operatorType.getNumber());
    +    if (metricNames == null) {
    +      return "";
    +    }
    +
    +    final String[] metricsTableColumnNames = new String[metricNames.length 
+ 1];
    +    metricsTableColumnNames[0] = "Minor Fragment";
    +    int i = 1;
    +    for (final String metricName : metricNames) {
    +      metricsTableColumnNames[i++] = metricName;
    +    }
    +    final TableBuilder builder = new TableBuilder(metricsTableColumnNames);
    +    for (final ImmutablePair<OperatorProfile, Integer> ip : ops) {
    +      final OperatorProfile op = ip.getLeft();
    +
    +      builder.appendCell(
    +          new OperatorPathBuilder()
    +              .setMajor(major)
    +              .setMinor(ip.getRight())
    +              .setOperator(op)
    +              .build(),
    +          null);
    +
    +      final Map<Integer, Number> valueMap = Maps.newHashMap(); // metric 
id --> metric value
    --- End diff --
    
    I had already made this change (testing right now).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to