|
91 | 91 | next; |
92 | 92 | } |
93 | 93 |
|
94 | | - if (/\b(InstancePeakMemoryUsage|__MAX_OF_InstancePeakMemoryUsage|InstanceNum):\s+(.*)/) { |
| 94 | + if (/\b(InstanceNum):\s+(.*)/) { |
95 | 95 | $plan->{$fragment}{$1}=$2; |
96 | 96 | $plan->{$fragment}{id}=$fragment; |
97 | 97 | next; |
98 | 98 | } |
99 | 99 |
|
| 100 | + if (/\b(InstancePeakMemoryUsage|__MAX_OF_InstancePeakMemoryUsage|InstanceNum):\s+(.*)/) { |
| 101 | + $plan->{$fragment}{$1}=norm_bytes($2); |
| 102 | + $plan->{$fragment}{id}=$fragment; |
| 103 | + next; |
| 104 | + } |
| 105 | + |
100 | 106 | if (/\b(MemoryLimit|PeakMemoryUsage|__MAX_OF_PeakMemoryUsage):\s+(.*)/) { |
101 | 107 | if (defined($operator)){ |
102 | 108 | my $operator_id = join "_", ($fragment, $pipeline, $operator); |
103 | | - $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{$1}=$2; |
| 109 | + $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{$1}=norm_bytes($2); |
104 | 110 | $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{id}=$operator_id; |
105 | 111 | } elsif(defined($pipeline)) { |
106 | | - $plan->{$fragment}{pipelines}{$pipeline}{$1}=$2; |
| 112 | + $plan->{$fragment}{pipelines}{$pipeline}{$1}=norm_bytes($2); |
107 | 113 | } else { |
108 | | - $plan->{$fragment}{$1}=$2; |
| 114 | + $plan->{$fragment}{$1}=norm_bytes($2); |
109 | 115 | $plan->{$fragment}{id}=$fragment; |
110 | 116 | } |
111 | 117 | next; |
|
124 | 130 | next; |
125 | 131 | } |
126 | 132 |
|
127 | | - if (/\b(DegreeOfParallelism|TotalDegreeOfParallelism):\s+(\d+(?:(?:\.\d+)\w+)?)/) { |
| 133 | + if (/\b(DegreeOfParallelism|TotalDegreeOfParallelism|PeakDriverQueueSize|__MAX_OF_PeakDriverQueueSize):\s+(\d+(?:(?:\.\d+)\w+)?)/) { |
128 | 134 | $plan->{$fragment}{pipelines}{$pipeline}{$1}=norm_num($2); |
129 | 135 | next; |
130 | 136 | } |
|
163 | 169 | } |
164 | 170 | if (/\b(BytesPassThrough|BytesSent|BlockCacheWriteBytes|__MAX_OF_BlockCacheWriteBytes|BlockCacheReadBytes|__MAX_OF_BlockCacheReadBytes|InputRequiredMemory|__MAX_OF_InputRequiredMemory|MergeUnsortedPeakMemoryUsage|__MAX_OF_MergeUnsortedPeakMemoryUsage|MergeSortedPeakMemoryUsage|__MAX_OF_MergeSortedPeakMemoryUsage|SortPartialPeakMemoryUsage|__MAX_OF_SortPartialPeakMemoryUsage|UpcompressedBytes|OperatorPeakMemoryUsage|__MAX_OF_OperatorPeakMemoryUsage):\s+(.*)/) { |
165 | 171 | my $operator_id = join "_", ($fragment, $pipeline, $operator); |
166 | | - $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{$1}=$2; |
| 172 | + $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{$1}=norm_bytes($2); |
167 | 173 | $plan->{$fragment}{pipelines}{$pipeline}{operators}{$operator}{id}=$operator_id; |
168 | 174 | next; |
169 | 175 | } |
|
187 | 193 | my @fragments = grep {exists $_->{$index}} @$fragments; |
188 | 194 | my @pipelines = grep {exists $_->{$index}} @$pipelines; |
189 | 195 | my @ops= grep {exists $_->{$index}} @$ops; |
| 196 | +#print Dumper([@fragments, @pipelines, @ops]); |
190 | 197 | print join "\n", map {sprintf "%s\t\t%s\t%s", "".$_->{$index}, $index, $_->{id}} sort{$a->{$index} <=> $b->{$index}} (@fragments, @pipelines, @ops); |
191 | 198 | print "\n"; |
0 commit comments