Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

public class CycleMetrics implements Serializable {

private static final int BYTES_PER_KB = 1024;

private String name;
private String pipelineName;
private String opName;
Expand Down Expand Up @@ -172,9 +174,9 @@ public static CycleMetrics build(String metricName,
cycleMetrics.setAvgGcTime(totalGcTime / taskNum);
cycleMetrics.setSlowestTaskExecuteTime(slowestTaskExecuteTime);
cycleMetrics.setInputRecords(totalInputRecords);
cycleMetrics.setInputKb(totalInputBytes / 1024);
cycleMetrics.setInputKb(totalInputBytes / BYTES_PER_KB);
cycleMetrics.setOutputRecords(totalOutputRecords);
cycleMetrics.setOutputKb(totalOutputBytes / 1024);
cycleMetrics.setOutputKb(totalOutputBytes / BYTES_PER_KB);
return cycleMetrics;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

public class ShuffleReadMetrics implements Serializable {

private static final int BYTES_PER_KB = 1024;

private int fetchSlices;
/**
* total records of fetch response.
Expand Down Expand Up @@ -123,7 +125,7 @@ public void incFetchWaitMs(long fetchWaitMs) {

@Override
public String toString() {
return "ReadMetrics{" + "fetchSlices=" + fetchSlices + ", fetchRecords=" + fetchRecords + ", decodeKB=" + decodeBytes / 1024 + ", fetchWaitMs=" + fetchWaitMs
return "ReadMetrics{" + "fetchSlices=" + fetchSlices + ", fetchRecords=" + fetchRecords + ", decodeKB=" + decodeBytes / BYTES_PER_KB + ", fetchWaitMs=" + fetchWaitMs
+ ", decodeMs=" + decodeMs + '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

public class ShuffleWriteMetrics implements Serializable {

private static final int BYTES_PER_KB = 1024;

/**
* total output channels.
*/
Expand Down Expand Up @@ -216,7 +218,7 @@ public void updateMaxSpillKB(long spillKB) {
@Override
public String toString() {
return "WriteMetrics{" + "outputRecords=" + writtenRecords + ", encodedKb="
+ encodedSize / 1024 + ", encodeMs=" + encodeMs + ", spillNum=" + spillNum
+ encodedSize / BYTES_PER_KB + ", encodeMs=" + encodeMs + ", spillNum=" + spillNum
+ ", spillDisk=" + spillDisk + ", oomCnt=" + oomCount + ", spillMs=" + spillMs
+ ", maxSpillKB=" + maxSpillKB + ", " + "maxSliceKB=" + maxSliceKB + ", channels="
+ numChannels + ", writtenChannels=" + writtenChannels + '}';
Expand Down