/
QueryStage.java
757 lines (670 loc) · 22.8 KB
/
QueryStage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
/*
* Copyright 2015 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.bigquery;
import com.google.api.services.bigquery.model.ExplainQueryStage;
import com.google.api.services.bigquery.model.ExplainQueryStep;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
/**
* BigQuery provides diagnostic information about a completed query's execution plan (or query plan
* for short). The query plan describes a query as a series of stages, with each stage comprising a
* number of steps that read from data sources, perform a series of transformations on the input,
* and emit an output to a future stage (or the final result). This class contains information on a
* query stage.
*
* @see <a href="https://cloud.google.com/bigquery/query-plan-explanation">Query Plan</a>
*/
public class QueryStage implements Serializable {
static final Function<ExplainQueryStage, QueryStage> FROM_PB_FUNCTION =
new Function<ExplainQueryStage, QueryStage>() {
@Override
public QueryStage apply(ExplainQueryStage pb) {
return QueryStage.fromPb(pb);
}
};
static final Function<QueryStage, ExplainQueryStage> TO_PB_FUNCTION =
new Function<QueryStage, ExplainQueryStage>() {
@Override
public ExplainQueryStage apply(QueryStage stage) {
return stage.toPb();
}
};
private static final long serialVersionUID = -472281297327952320L;
/**
* Each query stage is made of a number of steps. This class contains information on a query step.
*
* @see <a href="https://cloud.google.com/bigquery/query-plan-explanation#steps_metadata">Steps
* Metadata</a>
*/
public static class QueryStep implements Serializable {
static final Function<ExplainQueryStep, QueryStep> FROM_PB_FUNCTION =
new Function<ExplainQueryStep, QueryStep>() {
@Override
public QueryStep apply(ExplainQueryStep pb) {
return QueryStep.fromPb(pb);
}
};
static final Function<QueryStep, ExplainQueryStep> TO_PB_FUNCTION =
new Function<QueryStep, ExplainQueryStep>() {
@Override
public ExplainQueryStep apply(QueryStep stage) {
return stage.toPb();
}
};
private static final long serialVersionUID = 8663444604771794411L;
private final String name;
private final List<String> substeps;
QueryStep(String name, List<String> substeps) {
this.name = name;
this.substeps = substeps;
}
/**
* Returns a machine-readable name for the operation.
*
* @see <a href="https://cloud.google.com/bigquery/query-plan-explanation#steps_metadata">Steps
* Metadata</a>
*/
public String getName() {
return name;
}
/** Returns a list of human-readable stage descriptions. */
public List<String> getSubsteps() {
return substeps;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("name", name)
.add("substeps", substeps)
.toString();
}
@Override
public int hashCode() {
return Objects.hash(name, substeps);
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof QueryStep)) {
return false;
}
QueryStep other = (QueryStep) obj;
return Objects.equals(name, other.name) && Objects.equals(substeps, other.substeps);
}
ExplainQueryStep toPb() {
return new ExplainQueryStep().setKind(name).setSubsteps(substeps);
}
static QueryStep fromPb(com.google.api.services.bigquery.model.ExplainQueryStep stepPb) {
return new QueryStep(
stepPb.getKind(),
ImmutableList.copyOf(
stepPb.getSubsteps() != null ? stepPb.getSubsteps() : ImmutableList.<String>of()));
}
}
private final long completedParallelInputs;
private final long computeMsAvg;
private final long computeMsMax;
private final double computeRatioAvg;
private final double computeRatioMax;
private final long endMs;
private final long generatedId;
private final List<Long> inputStages;
private final String name;
private final long parallelInputs;
private final long readMsAvg;
private final long readMsMax;
private final double readRatioAvg;
private final double readRatioMax;
private final long recordsRead;
private final long recordsWritten;
private final long shuffleOutputBytes;
private final long shuffleOutputBytesSpilled;
private final List<QueryStep> steps;
private final long startMs;
private String status;
private final long waitMsAvg;
private final long waitMsMax;
private final double waitRatioAvg;
private final double waitRatioMax;
private final long writeMsAvg;
private final long writeMsMax;
private final double writeRatioAvg;
private final double writeRatioMax;
private final long slotMs;
static final class Builder {
private long completedParallelInputs;
private long computeMsAvg;
private long computeMsMax;
private double computeRatioAvg;
private double computeRatioMax;
private long endMs;
private long generatedId;
private List<Long> inputStages;
private String name;
private long parallelInputs;
private long readMsAvg;
private long readMsMax;
private double readRatioAvg;
private double readRatioMax;
private long recordsRead;
private long recordsWritten;
private long shuffleOutputBytes;
private long shuffleOutputBytesSpilled;
private long startMs;
private String status;
private List<QueryStep> steps;
private long waitMsAvg;
private long waitMsMax;
private double waitRatioAvg;
private double waitRatioMax;
private long writeMsAvg;
private long writeMsMax;
private double writeRatioAvg;
private double writeRatioMax;
private long slotMs;
private Builder() {}
Builder setCompletedParallelInputs(long completedParallelInputs) {
this.completedParallelInputs = completedParallelInputs;
return this;
}
Builder setComputeMsAvg(long computeMsAvg) {
this.computeMsAvg = computeMsAvg;
return this;
}
Builder setComputeMsMax(long computeMsMax) {
this.computeMsMax = computeMsMax;
return this;
}
Builder setComputeRatioAvg(double computeRatioAvg) {
this.computeRatioAvg = computeRatioAvg;
return this;
}
Builder setComputeRatioMax(double computeRatioMax) {
this.computeRatioMax = computeRatioMax;
return this;
}
Builder setEndMs(long endMs) {
this.endMs = endMs;
return this;
}
Builder setGeneratedId(long generatedId) {
this.generatedId = generatedId;
return this;
}
Builder setInputStages(List<Long> inputStages) {
this.inputStages = inputStages;
return this;
}
Builder setName(String name) {
this.name = name;
return this;
}
Builder setParallelInputs(long parallelInputs) {
this.parallelInputs = parallelInputs;
return this;
}
Builder setReadMsAvg(long readMsAvg) {
this.readMsAvg = readMsAvg;
return this;
}
Builder setReadMsMax(long readMsMax) {
this.readMsMax = readMsMax;
return this;
}
Builder setReadRatioAvg(double readRatioAvg) {
this.readRatioAvg = readRatioAvg;
return this;
}
Builder setReadRatioMax(double readRatioMax) {
this.readRatioMax = readRatioMax;
return this;
}
Builder setRecordsRead(long recordsRead) {
this.recordsRead = recordsRead;
return this;
}
Builder setRecordsWritten(long recordsWritten) {
this.recordsWritten = recordsWritten;
return this;
}
Builder setShuffleOutputBytes(long shuffleOutputBytes) {
this.shuffleOutputBytes = shuffleOutputBytes;
return this;
}
Builder setShuffleOutputBytesSpilled(long shuffleOutputBytesSpilled) {
this.shuffleOutputBytesSpilled = shuffleOutputBytesSpilled;
return this;
}
Builder setStartMs(long startMs) {
this.startMs = startMs;
return this;
}
Builder setStatus(String status) {
this.status = status;
return this;
}
Builder setSteps(List<QueryStep> steps) {
this.steps = steps;
return this;
}
Builder setWaitMsAvg(long waitMsAvg) {
this.waitMsAvg = waitMsAvg;
return this;
}
Builder setWaitMsMax(long waitMsMax) {
this.waitMsMax = waitMsMax;
return this;
}
Builder setWaitRatioAvg(double waitRatioAvg) {
this.waitRatioAvg = waitRatioAvg;
return this;
}
Builder setWaitRatioMax(double waitRatioMax) {
this.waitRatioMax = waitRatioMax;
return this;
}
Builder setWriteMsAvg(long writeMsAvg) {
this.writeMsAvg = writeMsAvg;
return this;
}
Builder setWriteMsMax(long writeMsMax) {
this.writeMsMax = writeMsMax;
return this;
}
Builder setWriteRatioAvg(double writeRatioAvg) {
this.writeRatioAvg = writeRatioAvg;
return this;
}
Builder setWriteRatioMax(double writeRatioMax) {
this.writeRatioMax = writeRatioMax;
return this;
}
Builder setSlotMs(long slotMs) {
this.slotMs = slotMs;
return this;
}
QueryStage build() {
return new QueryStage(this);
}
}
QueryStage(Builder builder) {
completedParallelInputs = builder.completedParallelInputs;
computeMsAvg = builder.computeMsAvg;
computeMsMax = builder.computeMsMax;
computeRatioAvg = builder.computeRatioAvg;
computeRatioMax = builder.computeRatioMax;
endMs = builder.endMs;
generatedId = builder.generatedId;
inputStages = builder.inputStages;
name = builder.name;
parallelInputs = builder.parallelInputs;
readMsAvg = builder.readMsAvg;
readMsMax = builder.readMsMax;
readRatioAvg = builder.readRatioAvg;
readRatioMax = builder.readRatioMax;
recordsRead = builder.recordsRead;
recordsWritten = builder.recordsWritten;
shuffleOutputBytes = builder.shuffleOutputBytes;
shuffleOutputBytesSpilled = builder.shuffleOutputBytesSpilled;
startMs = builder.startMs;
status = builder.status;
steps = builder.steps;
waitMsAvg = builder.waitMsAvg;
waitMsMax = builder.waitMsMax;
waitRatioAvg = builder.waitRatioAvg;
waitRatioMax = builder.waitRatioMax;
writeMsAvg = builder.writeMsAvg;
writeMsMax = builder.writeMsMax;
writeRatioAvg = builder.writeRatioAvg;
writeRatioMax = builder.writeRatioMax;
slotMs = builder.slotMs;
}
/** Returns the number of parallel input segments completed. */
public long getCompletedParallelInputs() {
return completedParallelInputs;
}
/** Returns the time in milliseconds the average worker spent on CPU-bound tasks. */
public long getComputeMsAvg() {
return computeMsAvg;
}
/** Returns the time in milliseconds the slowest worker spent on CPU-bound tasks. */
public long getComputeMsMax() {
return computeMsMax;
}
/**
* Returns the time the average worker spent CPU-bound, divided by the longest time spent by any
* worker in any segment.
*/
public double getComputeRatioAvg() {
return computeRatioAvg;
}
/**
* Returns the time the slowest worker spent CPU-bound, divided by the longest time spent by any
* worker in any segment.
*/
public double getComputeRatioMax() {
return computeRatioMax;
}
/** Returns the stage end time represented as milliseconds since epoch. */
public long getEndMs() {
return endMs;
}
/** Returns a unique, server-generated ID for the stage within its plan. */
public long getGeneratedId() {
return generatedId;
}
/** Returns a list of the stage IDs that are inputs to this stage. */
public List<Long> getInputStages() {
return inputStages;
}
/** Returns a human-readable name for the stage. */
public String getName() {
return name;
}
/** Returns the number of parallel input segments to be processed. */
public long getParallelInputs() {
return parallelInputs;
}
/** Returns the time in milliseconds the average worker spent reading input. */
public long getReadMsAvg() {
return readMsAvg;
}
/** Returns the time in milliseconds the slowest worker spent reading input. */
public long getReadMsMax() {
return readMsMax;
}
/**
* Returns the time the average worker spent reading input data, divided by the longest time spent
* by any worker in any segment.
*/
public double getReadRatioAvg() {
return readRatioAvg;
}
/**
* Returns the time the slowest worker spent reading input data, divided by the longest time spent
* by any worker in any segment.
*/
public double getReadRatioMax() {
return readRatioMax;
}
/** Returns the number of rows (top-level records) read by the stage. */
public long getRecordsRead() {
return recordsRead;
}
/** Returns the number of rows (top-level records) written by the stage. */
public long getRecordsWritten() {
return recordsWritten;
}
/** Returns the total number of bytes written to shuffle. */
public long getShuffleOutputBytes() {
return shuffleOutputBytes;
}
/** Returns the total number of bytes writtedn to shuffle and spilled to disk. */
public long getShuffleOutputBytesSpilled() {
return shuffleOutputBytesSpilled;
}
/** Returns the stage start time represented as milliseconds since epoch. */
public long getStartMs() {
return startMs;
}
/** Returns the current status for the stage. */
public String getStatus() {
return status;
}
/**
* Returns the list of steps within the stage in dependency order (approximately chronological).
*/
public List<QueryStep> getSteps() {
return steps;
}
/** Returns the time in milliseconds the average worker spent waiting to be scheduled. */
public long getWaitMsAvg() {
return waitMsAvg;
}
/** Returns the time in milliseconds the slowest worker spent waiting to be scheduled. */
public long getWaitMsMax() {
return waitMsMax;
}
/**
* Returns the time the average worker spent waiting to be scheduled, divided by the longest time
* spent by any worker in any segment.
*/
public double getWaitRatioAvg() {
return waitRatioAvg;
}
/**
* Returns the time the slowest worker spent waiting to be scheduled, divided by the longest time
* spent by any worker in any segment.
*/
public double getWaitRatioMax() {
return waitRatioMax;
}
/** Returns the time in milliseconds the average worker spent writing output. */
public long getWriteMsAvg() {
return writeMsAvg;
}
/** Returns the time in milliseconds the slowest worker spent writing output. */
public long getWriteMsMax() {
return writeMsMax;
}
/**
* Returns the time the average worker spent writing output data, divided by the longest time
* spent by any worker in any segment.
*/
public double getWriteRatioAvg() {
return writeRatioAvg;
}
/**
* Returns the time the slowest worker spent writing output data, divided by the longest time
* spent by any worker in any segment.
*/
public double getWriteRatioMax() {
return writeRatioMax;
}
/** Returns the slot-milliseconds used by the stage. */
public long getSlotMs() {
return slotMs;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("completedParallelInputs", completedParallelInputs)
.add("computeMsAvg", computeMsAvg)
.add("computeMsMax", computeMsMax)
.add("computeRatioAvg", computeRatioAvg)
.add("computeRatioMax", computeRatioMax)
.add("endMs", endMs)
.add("generatedId", generatedId)
.add("inputStages", inputStages)
.add("name", name)
.add("parallelInputs", parallelInputs)
.add("readMsAvg", readMsAvg)
.add("readMsMax", readMsMax)
.add("readRatioAvg", readRatioAvg)
.add("readRatioMax", readRatioMax)
.add("recordsRead", recordsRead)
.add("recordsWritten", recordsWritten)
.add("shuffleOutputBytes", shuffleOutputBytes)
.add("shuffleOutputBytesSpilled", shuffleOutputBytesSpilled)
.add("startMs", startMs)
.add("status", status)
.add("steps", steps)
.add("waitMsAvg", waitMsAvg)
.add("waitMsMax", waitMsMax)
.add("waitRatioAvg", waitRatioAvg)
.add("waitRatioMax", waitRatioMax)
.add("writeMsAvg", writeMsAvg)
.add("writeMsMax", writeMsMax)
.add("writeRatioAvg", writeRatioAvg)
.add("writeRatioMax", writeRatioMax)
.add("slotMs", slotMs)
.toString();
}
@Override
public final int hashCode() {
return Objects.hash(
completedParallelInputs,
computeMsAvg,
computeMsMax,
computeRatioAvg,
computeRatioMax,
endMs,
generatedId,
inputStages,
name,
parallelInputs,
readMsAvg,
readMsMax,
readRatioAvg,
readRatioMax,
recordsRead,
recordsWritten,
shuffleOutputBytes,
shuffleOutputBytesSpilled,
startMs,
status,
steps,
waitMsAvg,
waitMsMax,
waitRatioAvg,
waitRatioMax,
writeMsAvg,
writeMsMax,
writeRatioAvg,
writeRatioMax,
slotMs);
}
@Override
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj == null || !obj.getClass().equals(QueryStage.class)) {
return false;
}
QueryStage other = (QueryStage) obj;
return generatedId == other.generatedId
&& completedParallelInputs == other.completedParallelInputs
&& computeMsAvg == other.computeMsAvg
&& computeMsMax == other.computeMsMax
&& computeRatioAvg == other.computeRatioAvg
&& computeRatioMax == other.computeRatioMax
&& endMs == other.endMs
&& parallelInputs == other.parallelInputs
&& readMsAvg == other.readMsAvg
&& readMsMax == other.readMsMax
&& readRatioAvg == other.readRatioAvg
&& readRatioMax == other.readRatioMax
&& recordsRead == other.recordsRead
&& recordsWritten == other.recordsWritten
&& shuffleOutputBytes == other.shuffleOutputBytes
&& shuffleOutputBytesSpilled == other.shuffleOutputBytesSpilled
&& startMs == other.startMs
&& waitMsAvg == other.waitMsAvg
&& waitMsMax == other.waitMsMax
&& waitRatioAvg == other.waitRatioAvg
&& waitRatioMax == other.waitRatioMax
&& writeMsAvg == other.writeMsAvg
&& writeMsMax == other.writeMsMax
&& writeRatioAvg == other.writeRatioAvg
&& writeRatioMax == other.writeRatioMax
&& Objects.equals(steps, other.steps)
&& Objects.equals(name, other.name)
&& Objects.equals(status, other.status)
&& Objects.equals(inputStages, other.inputStages)
&& Objects.equals(slotMs, other.slotMs);
}
static Builder newBuilder() {
return new Builder();
}
ExplainQueryStage toPb() {
ExplainQueryStage stagePb =
new ExplainQueryStage()
.setCompletedParallelInputs(completedParallelInputs)
.setComputeMsAvg(computeMsAvg)
.setComputeMsMax(computeMsMax)
.setComputeRatioAvg(computeRatioAvg)
.setComputeRatioMax(computeRatioMax)
.setEndMs(endMs)
.setId(generatedId)
.setInputStages(inputStages)
.setName(name)
.setParallelInputs(parallelInputs)
.setReadMsAvg(readMsAvg)
.setReadMsMax(readMsMax)
.setReadRatioAvg(readRatioAvg)
.setReadRatioMax(readRatioMax)
.setRecordsRead(recordsRead)
.setRecordsWritten(recordsWritten)
.setShuffleOutputBytes(shuffleOutputBytes)
.setShuffleOutputBytesSpilled(shuffleOutputBytesSpilled)
.setStartMs(startMs)
.setStatus(status)
.setWaitMsAvg(waitMsAvg)
.setWaitMsMax(waitMsMax)
.setWaitRatioAvg(waitRatioAvg)
.setWaitRatioMax(waitRatioMax)
.setWriteMsAvg(writeMsAvg)
.setWriteMsMax(writeMsMax)
.setWriteRatioAvg(writeRatioAvg)
.setWriteRatioMax(writeRatioMax)
.setSlotMs(slotMs);
if (steps != null) {
stagePb.setSteps(Lists.transform(steps, QueryStep.TO_PB_FUNCTION));
}
return stagePb;
}
static QueryStage fromPb(com.google.api.services.bigquery.model.ExplainQueryStage stagePb) {
Builder builder = new QueryStage.Builder();
builder.setCompletedParallelInputs(stagePb.getCompletedParallelInputs());
builder.setComputeMsAvg(stagePb.getComputeMsAvg());
builder.setComputeMsMax(stagePb.getComputeMsMax());
builder.setComputeRatioAvg(stagePb.getComputeRatioAvg());
builder.setComputeRatioMax(stagePb.getComputeRatioMax());
builder.setEndMs(stagePb.getEndMs());
builder.setGeneratedId(stagePb.getId());
builder.setInputStages(stagePb.getInputStages());
builder.setName(stagePb.getName());
builder.setParallelInputs(stagePb.getParallelInputs());
builder.setReadMsAvg(stagePb.getReadMsAvg());
builder.setReadMsMax(stagePb.getReadMsMax());
builder.setReadRatioAvg(stagePb.getReadRatioAvg());
builder.setReadRatioMax(stagePb.getReadRatioMax());
builder.setRecordsRead(stagePb.getRecordsRead());
builder.setRecordsWritten(stagePb.getRecordsWritten());
builder.setShuffleOutputBytes(stagePb.getShuffleOutputBytes());
builder.setShuffleOutputBytesSpilled(stagePb.getShuffleOutputBytesSpilled());
builder.setStartMs(stagePb.getStartMs());
builder.setStatus(stagePb.getStatus());
if (stagePb.getSteps() != null) {
builder.setSteps(Lists.transform(stagePb.getSteps(), QueryStep.FROM_PB_FUNCTION));
}
builder.setWaitMsAvg(stagePb.getWaitMsAvg());
builder.setWaitMsMax(stagePb.getWaitMsMax());
builder.setWaitRatioAvg(stagePb.getWaitRatioAvg());
builder.setWaitRatioMax(stagePb.getWaitRatioMax());
builder.setWriteMsAvg(stagePb.getWriteMsAvg());
builder.setWriteMsMax(stagePb.getWriteMsMax());
builder.setWriteRatioAvg(stagePb.getWriteRatioAvg());
builder.setWriteRatioMax(stagePb.getWriteRatioMax());
builder.setSlotMs(stagePb.getSlotMs());
return builder.build();
}
}