diff --git a/client/trino-client/src/main/java/io/trino/client/StatementStats.java b/client/trino-client/src/main/java/io/trino/client/StatementStats.java index b0d3e94ef929..415b07d2c03a 100644 --- a/client/trino-client/src/main/java/io/trino/client/StatementStats.java +++ b/client/trino-client/src/main/java/io/trino/client/StatementStats.java @@ -36,14 +36,18 @@ public class StatementStats private final int queuedSplits; private final int runningSplits; private final int completedSplits; + private final long planningTimeMillis; + private final long analysisTimeMillis; private final long cpuTimeMillis; private final long wallTimeMillis; private final long queuedTimeMillis; private final long elapsedTimeMillis; + private final long finishingTimeMillis; private final long processedRows; private final long processedBytes; private final long physicalInputBytes; private final long physicalWrittenBytes; + private final long internalNetworkInputBytes; private final long peakMemoryBytes; private final long spilledBytes; private final StageStats rootStage; @@ -60,14 +64,18 @@ public StatementStats( @JsonProperty("queuedSplits") int queuedSplits, @JsonProperty("runningSplits") int runningSplits, @JsonProperty("completedSplits") int completedSplits, + @JsonProperty("planningTimeMillis") long planningTimeMillis, + @JsonProperty("analysisTimeMillis") long analysisTimeMillis, @JsonProperty("cpuTimeMillis") long cpuTimeMillis, @JsonProperty("wallTimeMillis") long wallTimeMillis, @JsonProperty("queuedTimeMillis") long queuedTimeMillis, @JsonProperty("elapsedTimeMillis") long elapsedTimeMillis, + @JsonProperty("finishingTimeMillis") long finishingTimeMillis, @JsonProperty("processedRows") long processedRows, @JsonProperty("processedBytes") long processedBytes, @JsonProperty("physicalInputBytes") long physicalInputBytes, @JsonProperty("physicalWrittenBytes") long physicalWrittenBytes, + @JsonProperty("internalNetworkInputBytes") long internalNetworkInputBytes, @JsonProperty("peakMemoryBytes") long peakMemoryBytes, @JsonProperty("spilledBytes") long spilledBytes, @JsonProperty("rootStage") StageStats rootStage) @@ -82,14 +90,18 @@ public StatementStats( this.queuedSplits = queuedSplits; this.runningSplits = runningSplits; this.completedSplits = completedSplits; + this.planningTimeMillis = planningTimeMillis; + this.analysisTimeMillis = analysisTimeMillis; this.cpuTimeMillis = cpuTimeMillis; this.wallTimeMillis = wallTimeMillis; this.queuedTimeMillis = queuedTimeMillis; this.elapsedTimeMillis = elapsedTimeMillis; + this.finishingTimeMillis = finishingTimeMillis; this.processedRows = processedRows; this.processedBytes = processedBytes; this.physicalInputBytes = physicalInputBytes; this.physicalWrittenBytes = physicalWrittenBytes; + this.internalNetworkInputBytes = internalNetworkInputBytes; this.peakMemoryBytes = peakMemoryBytes; this.spilledBytes = spilledBytes; this.rootStage = rootStage; @@ -155,6 +167,18 @@ public int getCompletedSplits() return completedSplits; } + @JsonProperty + public long getPlanningTimeMillis() + { + return planningTimeMillis; + } + + @JsonProperty + public long getAnalysisTimeMillis() + { + return analysisTimeMillis; + } + @JsonProperty public long getCpuTimeMillis() { @@ -179,6 +203,12 @@ public long getElapsedTimeMillis() return elapsedTimeMillis; } + @JsonProperty + public long getFinishingTimeMillis() + { + return finishingTimeMillis; + } + @JsonProperty public long getProcessedRows() { @@ -203,6 +233,12 @@ public long getPhysicalWrittenBytes() return physicalWrittenBytes; } + @JsonProperty + public long getInternalNetworkInputBytes() + { + return internalNetworkInputBytes; + } + @JsonProperty public long getPeakMemoryBytes() { @@ -236,14 +272,18 @@ public String toString() .add("queuedSplits", queuedSplits) .add("runningSplits", runningSplits) .add("completedSplits", completedSplits) + .add("planningTimeMillis", planningTimeMillis) + .add("analysisTimeMillis", analysisTimeMillis) .add("cpuTimeMillis", cpuTimeMillis) .add("wallTimeMillis", wallTimeMillis) .add("queuedTimeMillis", queuedTimeMillis) .add("elapsedTimeMillis", elapsedTimeMillis) + .add("finishingTimeMillis", finishingTimeMillis) .add("processedRows", processedRows) .add("processedBytes", processedBytes) .add("physicalInputBytes", physicalInputBytes) .add("physicalWrittenBytes", physicalWrittenBytes) + .add("internalNetworkInputBytes", internalNetworkInputBytes) .add("peakMemoryBytes", peakMemoryBytes) .add("spilledBytes", spilledBytes) .add("rootStage", rootStage) @@ -267,14 +307,18 @@ public static class Builder private int queuedSplits; private int runningSplits; private int completedSplits; + private long planningTimeMillis; + private long analysisTimeMillis; private long cpuTimeMillis; private long wallTimeMillis; private long queuedTimeMillis; private long elapsedTimeMillis; + private long finishingTimeMillis; private long processedRows; private long processedBytes; private long physicalInputBytes; private long physicalWrittenBytes; + private long internalNetworkInputBytes; private long peakMemoryBytes; private long spilledBytes; private StageStats rootStage; @@ -341,6 +385,18 @@ public Builder setCompletedSplits(int completedSplits) return this; } + public Builder setPlanningTimeMillis(long planningTimeMillis) + { + this.planningTimeMillis = planningTimeMillis; + return this; + } + + public Builder setAnalysisTimeMillis(long analysisTimeMillis) + { + this.analysisTimeMillis = analysisTimeMillis; + return this; + } + public Builder setCpuTimeMillis(long cpuTimeMillis) { this.cpuTimeMillis = cpuTimeMillis; @@ -365,6 +421,12 @@ public Builder setElapsedTimeMillis(long elapsedTimeMillis) return this; } + public Builder setFinishingTimeMillis(long finishingTimeMillis) + { + this.finishingTimeMillis = finishingTimeMillis; + return this; + } + public Builder setProcessedRows(long processedRows) { this.processedRows = processedRows; @@ -389,6 +451,12 @@ public Builder setPhysicalWrittenBytes(long physicalWrittenBytes) return this; } + public Builder setInternalNetworkInputBytes(long internalNetworkInputBytes) + { + this.internalNetworkInputBytes = internalNetworkInputBytes; + return this; + } + public Builder setPeakMemoryBytes(long peakMemoryBytes) { this.peakMemoryBytes = peakMemoryBytes; @@ -420,14 +488,18 @@ public StatementStats build() queuedSplits, runningSplits, completedSplits, + planningTimeMillis, + analysisTimeMillis, cpuTimeMillis, wallTimeMillis, queuedTimeMillis, elapsedTimeMillis, + finishingTimeMillis, processedRows, processedBytes, physicalInputBytes, physicalWrittenBytes, + internalNetworkInputBytes, peakMemoryBytes, spilledBytes, rootStage); diff --git a/client/trino-client/src/test/java/io/trino/client/TestRetry.java b/client/trino-client/src/test/java/io/trino/client/TestRetry.java index ab72f2db0278..d000d2da97b5 100644 --- a/client/trino-client/src/test/java/io/trino/client/TestRetry.java +++ b/client/trino-client/src/test/java/io/trino/client/TestRetry.java @@ -143,7 +143,7 @@ private String newQueryResults(String state) TypedQueryData.of(IntStream.range(0, numRecords) .mapToObj(index -> Stream.of((Object) index, "a").collect(toList())) .collect(toList())), - new StatementStats(state, state.equals("QUEUED"), true, OptionalDouble.of(0), OptionalDouble.of(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null), + new StatementStats(state, state.equals("QUEUED"), true, OptionalDouble.of(0), OptionalDouble.of(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null), null, ImmutableList.of(), null, diff --git a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java index d09f3297de66..cac77f441ca0 100644 --- a/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java +++ b/client/trino-jdbc/src/main/java/io/trino/jdbc/QueryStats.java @@ -32,13 +32,19 @@ public final class QueryStats private final int queuedSplits; private final int runningSplits; private final int completedSplits; + private final long planningTimeMillis; + private final long analysisTimeMillis; private final long cpuTimeMillis; private final long wallTimeMillis; private final long queuedTimeMillis; private final long elapsedTimeMillis; + private final long finishingTimeMillis; private final long processedRows; private final long processedBytes; private final long peakMemoryBytes; + private final long physicalInputBytes; + private final long physicalWrittenBytes; + private final long internalNetworkInputBytes; private final Optional rootStage; public QueryStats( @@ -52,13 +58,19 @@ public QueryStats( int queuedSplits, int runningSplits, int completedSplits, + long planningTimeMillis, + long analysisTimeMillis, long cpuTimeMillis, long wallTimeMillis, long queuedTimeMillis, long elapsedTimeMillis, + long finishingTimeMillis, long processedRows, long processedBytes, long peakMemoryBytes, + long physicalInputBytes, + long physicalWrittenBytes, + long internalNetworkInputBytes, Optional rootStage) { this.queryId = requireNonNull(queryId, "queryId is null"); @@ -71,13 +83,19 @@ public QueryStats( this.queuedSplits = queuedSplits; this.runningSplits = runningSplits; this.completedSplits = completedSplits; + this.planningTimeMillis = planningTimeMillis; + this.analysisTimeMillis = analysisTimeMillis; this.cpuTimeMillis = cpuTimeMillis; this.wallTimeMillis = wallTimeMillis; this.queuedTimeMillis = queuedTimeMillis; this.elapsedTimeMillis = elapsedTimeMillis; + this.finishingTimeMillis = finishingTimeMillis; this.processedRows = processedRows; this.processedBytes = processedBytes; this.peakMemoryBytes = peakMemoryBytes; + this.physicalInputBytes = physicalInputBytes; + this.physicalWrittenBytes = physicalWrittenBytes; + this.internalNetworkInputBytes = internalNetworkInputBytes; this.rootStage = requireNonNull(rootStage, "rootStage is null"); } @@ -94,13 +112,19 @@ static QueryStats create(String queryId, StatementStats stats) stats.getQueuedSplits(), stats.getRunningSplits(), stats.getCompletedSplits(), + stats.getPlanningTimeMillis(), + stats.getAnalysisTimeMillis(), stats.getCpuTimeMillis(), stats.getWallTimeMillis(), stats.getQueuedTimeMillis(), stats.getElapsedTimeMillis(), + stats.getFinishingTimeMillis(), stats.getProcessedRows(), stats.getProcessedBytes(), stats.getPeakMemoryBytes(), + stats.getPhysicalInputBytes(), + stats.getPhysicalWrittenBytes(), + stats.getInternalNetworkInputBytes(), Optional.ofNullable(stats.getRootStage()).map(StageStats::create)); } @@ -154,6 +178,16 @@ public int getCompletedSplits() return completedSplits; } + public long getPlanningTimeMillis() + { + return planningTimeMillis; + } + + public long getAnalysisTimeMillis() + { + return analysisTimeMillis; + } + public long getCpuTimeMillis() { return cpuTimeMillis; @@ -174,6 +208,11 @@ public long getElapsedTimeMillis() return elapsedTimeMillis; } + public long getFinishingTimeMillis() + { + return finishingTimeMillis; + } + public long getProcessedRows() { return processedRows; @@ -189,6 +228,21 @@ public long getPeakMemoryBytes() return peakMemoryBytes; } + public long getPhysicalInputBytes() + { + return physicalInputBytes; + } + + public long getPhysicalWrittenBytes() + { + return physicalWrittenBytes; + } + + public long getInternalNetworkInputBytes() + { + return internalNetworkInputBytes; + } + public Optional getRootStage() { return rootStage; diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAsyncResultIterator.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAsyncResultIterator.java index dd41950adfd6..7aeaddedebd4 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAsyncResultIterator.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestAsyncResultIterator.java @@ -333,6 +333,10 @@ public StatementStats getStats() 100, 100, 100, + 100, + 100, + 100, + 100, StageStats.builder() .setStageId("id") .setDone(false) diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java index 000b47195e8c..09d92c170579 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestProgressMonitor.java @@ -99,7 +99,7 @@ private String newQueryResults(Integer partialCancelId, Integer nextUriId, List< nextUriId == null ? null : server.url(format("/v1/statement/%s/%s", queryId, nextUriId)).uri(), responseColumns, TypedQueryData.of(data), - new StatementStats(state, state.equals("QUEUED"), true, OptionalDouble.of(0), OptionalDouble.of(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null), + new StatementStats(state, state.equals("QUEUED"), true, OptionalDouble.of(0), OptionalDouble.of(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null), null, ImmutableList.of(), null, diff --git a/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java b/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java index a46a02b28f2c..bd2aabb64d62 100644 --- a/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java +++ b/core/trino-main/src/main/java/io/trino/execution/QueryStateMachine.java @@ -547,6 +547,7 @@ private BasicQueryStats createBasicQueryStats(BasicStageStats stageStats) stageStats.getSpilledDataSize(), stageStats.getPhysicalInputDataSize(), stageStats.getPhysicalWrittenDataSize(), + stageStats.getInternalNetworkInputDataSize(), stageStats.getCumulativeUserMemory(), stageStats.getFailedCumulativeUserMemory(), @@ -555,10 +556,13 @@ private BasicQueryStats createBasicQueryStats(BasicStageStats stageStats) succinctBytes(getPeakUserMemoryInBytes()), succinctBytes(getPeakTotalMemoryInBytes()), + queryStateTimer.getPlanningTime(), + queryStateTimer.getAnalysisTime(), stageStats.getTotalCpuTime(), stageStats.getFailedCpuTime(), stageStats.getTotalScheduledTime(), stageStats.getFailedScheduledTime(), + queryStateTimer.getFinishingTime(), stageStats.isFullyBlocked(), stageStats.getBlockedReasons(), diff --git a/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java b/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java index 76d7b10400ae..cfd3378db7b3 100644 --- a/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java +++ b/core/trino-main/src/main/java/io/trino/server/BasicQueryStats.java @@ -57,16 +57,20 @@ public class BasicQueryStats private final DataSize spilledDataSize; private final DataSize physicalInputDataSize; private final DataSize physicalWrittenDataSize; + private final DataSize internalNetworkInputDataSize; private final double cumulativeUserMemory; private final double failedCumulativeUserMemory; private final DataSize userMemoryReservation; private final DataSize totalMemoryReservation; private final DataSize peakUserMemoryReservation; private final DataSize peakTotalMemoryReservation; + private final Duration planningTime; + private final Duration analysisTime; private final Duration totalCpuTime; private final Duration failedCpuTime; private final Duration totalScheduledTime; private final Duration failedScheduledTime; + private final Duration finishingTime; private final boolean fullyBlocked; private final Set blockedReasons; @@ -92,16 +96,20 @@ public BasicQueryStats( @JsonProperty("spilledDataSize") DataSize spilledDataSize, @JsonProperty("physicalInputDataSize") DataSize physicalInputDataSize, @JsonProperty("physicalWrittenDataSize") DataSize physicalWrittenDataSize, + @JsonProperty("internalNetworkInputDataSize") DataSize internalNetworkInputDataSize, @JsonProperty("cumulativeUserMemory") double cumulativeUserMemory, @JsonProperty("failedCumulativeUserMemory") double failedCumulativeUserMemory, @JsonProperty("userMemoryReservation") DataSize userMemoryReservation, @JsonProperty("totalMemoryReservation") DataSize totalMemoryReservation, @JsonProperty("peakUserMemoryReservation") DataSize peakUserMemoryReservation, @JsonProperty("peakTotalMemoryReservation") DataSize peakTotalMemoryReservation, + @JsonProperty("planningTime") Duration planningTime, + @JsonProperty("analysisTime") Duration analysisTime, @JsonProperty("totalCpuTime") Duration totalCpuTime, @JsonProperty("failedCpuTime") Duration failedCpuTime, @JsonProperty("totalScheduledTime") Duration totalScheduledTime, @JsonProperty("failedScheduledTime") Duration failedScheduledTime, + @JsonProperty("finishingTime") Duration finishingTime, @JsonProperty("fullyBlocked") boolean fullyBlocked, @JsonProperty("blockedReasons") Set blockedReasons, @JsonProperty("progressPercentage") OptionalDouble progressPercentage, @@ -133,6 +141,7 @@ public BasicQueryStats( this.spilledDataSize = spilledDataSize; this.physicalInputDataSize = physicalInputDataSize; this.physicalWrittenDataSize = physicalWrittenDataSize; + this.internalNetworkInputDataSize = internalNetworkInputDataSize; this.cumulativeUserMemory = cumulativeUserMemory; this.failedCumulativeUserMemory = failedCumulativeUserMemory; @@ -140,10 +149,13 @@ public BasicQueryStats( this.totalMemoryReservation = totalMemoryReservation; this.peakUserMemoryReservation = peakUserMemoryReservation; this.peakTotalMemoryReservation = peakTotalMemoryReservation; + this.planningTime = planningTime; + this.analysisTime = analysisTime; this.totalCpuTime = totalCpuTime; this.failedCpuTime = failedCpuTime; this.totalScheduledTime = totalScheduledTime; this.failedScheduledTime = failedScheduledTime; + this.finishingTime = finishingTime; this.fullyBlocked = fullyBlocked; this.blockedReasons = ImmutableSet.copyOf(requireNonNull(blockedReasons, "blockedReasons is null")); @@ -170,16 +182,20 @@ public BasicQueryStats(QueryStats queryStats) queryStats.getSpilledDataSize(), queryStats.getPhysicalInputDataSize(), queryStats.getPhysicalWrittenDataSize(), + queryStats.getInternalNetworkInputDataSize(), queryStats.getCumulativeUserMemory(), queryStats.getFailedCumulativeUserMemory(), queryStats.getUserMemoryReservation(), queryStats.getTotalMemoryReservation(), queryStats.getPeakUserMemoryReservation(), queryStats.getPeakTotalMemoryReservation(), + queryStats.getPlanningTime(), + queryStats.getAnalysisTime(), queryStats.getTotalCpuTime(), queryStats.getFailedCpuTime(), queryStats.getTotalScheduledTime(), queryStats.getFailedScheduledTime(), + queryStats.getFinishingTime(), queryStats.isFullyBlocked(), queryStats.getBlockedReasons(), queryStats.getProgressPercentage(), @@ -206,6 +222,7 @@ public static BasicQueryStats immediateFailureQueryStats() DataSize.ofBytes(0), DataSize.ofBytes(0), DataSize.ofBytes(0), + DataSize.ofBytes(0), 0, 0, DataSize.ofBytes(0), @@ -216,6 +233,9 @@ public static BasicQueryStats immediateFailureQueryStats() new Duration(0, MILLISECONDS), new Duration(0, MILLISECONDS), new Duration(0, MILLISECONDS), + new Duration(0, MILLISECONDS), + new Duration(0, MILLISECONDS), + new Duration(0, MILLISECONDS), false, ImmutableSet.of(), OptionalDouble.empty(), @@ -318,6 +338,12 @@ public DataSize getPhysicalWrittenDataSize() return physicalWrittenDataSize; } + @JsonProperty + public DataSize getInternalNetworkInputDataSize() + { + return internalNetworkInputDataSize; + } + @JsonProperty public double getCumulativeUserMemory() { @@ -354,6 +380,18 @@ public DataSize getPeakTotalMemoryReservation() return peakTotalMemoryReservation; } + @JsonProperty + public Duration getPlanningTime() + { + return planningTime; + } + + @JsonProperty + public Duration getAnalysisTime() + { + return analysisTime; + } + @JsonProperty public Duration getTotalCpuTime() { @@ -378,6 +416,12 @@ public Duration getFailedScheduledTime() return failedScheduledTime; } + @JsonProperty + public Duration getFinishingTime() + { + return finishingTime; + } + @JsonProperty public boolean isFullyBlocked() { diff --git a/core/trino-main/src/main/java/io/trino/server/protocol/ProtocolUtil.java b/core/trino-main/src/main/java/io/trino/server/protocol/ProtocolUtil.java index 61adcb946f45..c8997ebe0125 100644 --- a/core/trino-main/src/main/java/io/trino/server/protocol/ProtocolUtil.java +++ b/core/trino-main/src/main/java/io/trino/server/protocol/ProtocolUtil.java @@ -182,14 +182,18 @@ public static StatementStats toStatementStats(ResultQueryInfo queryInfo) .setQueuedSplits(queryStats.getQueuedDrivers()) .setRunningSplits(queryStats.getRunningDrivers() + queryStats.getBlockedDrivers()) .setCompletedSplits(queryStats.getCompletedDrivers()) + .setPlanningTimeMillis(queryStats.getPlanningTime().toMillis()) + .setAnalysisTimeMillis(queryStats.getAnalysisTime().toMillis()) .setCpuTimeMillis(queryStats.getTotalCpuTime().toMillis()) .setWallTimeMillis(queryStats.getTotalScheduledTime().toMillis()) .setQueuedTimeMillis(queryStats.getQueuedTime().toMillis()) .setElapsedTimeMillis(queryStats.getElapsedTime().toMillis()) + .setFinishingTimeMillis(queryStats.getFinishingTime().toMillis()) .setProcessedRows(queryStats.getRawInputPositions()) .setProcessedBytes(queryStats.getRawInputDataSize().toBytes()) .setPhysicalInputBytes(queryStats.getPhysicalInputDataSize().toBytes()) .setPhysicalWrittenBytes(queryStats.getPhysicalWrittenDataSize().toBytes()) + .setInternalNetworkInputBytes(queryStats.getInternalNetworkInputDataSize().toBytes()) .setPeakMemoryBytes(queryStats.getPeakUserMemoryReservation().toBytes()) .setSpilledBytes(queryStats.getSpilledDataSize().toBytes()) .setRootStage(rootStageStats) diff --git a/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java b/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java index 9b3d998c0540..787e3e00dab7 100644 --- a/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java +++ b/core/trino-main/src/test/java/io/trino/execution/MockManagedQueryExecution.java @@ -136,6 +136,7 @@ public BasicQueryInfo getBasicQueryInfo() DataSize.ofBytes(13), DataSize.ofBytes(13), DataSize.ofBytes(13), + DataSize.ofBytes(13), 16.0, 17.0, memoryUsage, @@ -146,6 +147,9 @@ public BasicQueryInfo getBasicQueryInfo() new Duration(21, NANOSECONDS), new Duration(22, NANOSECONDS), new Duration(23, NANOSECONDS), + new Duration(24, NANOSECONDS), + new Duration(25, NANOSECONDS), + new Duration(26, NANOSECONDS), false, ImmutableSet.of(), OptionalDouble.empty(), diff --git a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryDataSerialization.java b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryDataSerialization.java index d1beddc5ca75..40b8f7797b41 100644 --- a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryDataSerialization.java +++ b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryDataSerialization.java @@ -245,14 +245,18 @@ private String queryResultsJson(String expectedDataField) "queuedSplits": 0, "runningSplits": 0, "completedSplits": 0, + "planningTimeMillis": 0, + "analysisTimeMillis": 0, "cpuTimeMillis": 0, "wallTimeMillis": 0, "queuedTimeMillis": 0, "elapsedTimeMillis": 0, + "finishingTimeMillis": 0, "processedRows": 0, "processedBytes": 0, "physicalInputBytes": 0, "physicalWrittenBytes": 0, + "internalNetworkInputBytes": 0, "peakMemoryBytes": 0, "spilledBytes": 0 }, diff --git a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultsSerialization.java b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultsSerialization.java index 56fc7a5cad13..d1ae9c5cabfa 100644 --- a/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultsSerialization.java +++ b/core/trino-main/src/test/java/io/trino/server/protocol/TestQueryResultsSerialization.java @@ -77,14 +77,18 @@ public void testNullDataSerialization() "queuedSplits" : 0, "runningSplits" : 0, "completedSplits" : 0, + "planningTimeMillis": 0, + "analysisTimeMillis": 0, "cpuTimeMillis" : 0, "wallTimeMillis" : 0, "queuedTimeMillis" : 0, "elapsedTimeMillis" : 0, + "finishingTimeMillis": 0, "processedRows" : 0, "processedBytes" : 0, "physicalInputBytes" : 0, "physicalWrittenBytes" : 0, + "internalNetworkInputBytes": 0, "peakMemoryBytes" : 0, "spilledBytes" : 0 }, @@ -153,14 +157,18 @@ private String queryResultsJson(String expectedDataField) "queuedSplits" : 0, "runningSplits" : 0, "completedSplits" : 0, + "planningTimeMillis": 0, + "analysisTimeMillis": 0, "cpuTimeMillis" : 0, "wallTimeMillis" : 0, "queuedTimeMillis" : 0, "elapsedTimeMillis" : 0, + "finishingTimeMillis": 0, "processedRows" : 0, "processedBytes" : 0, "physicalInputBytes" : 0, "physicalWrittenBytes" : 0, + "internalNetworkInputBytes": 0, "peakMemoryBytes" : 0, "spilledBytes" : 0 }, diff --git a/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java b/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java index f6af3da9e751..6c10463a742d 100644 --- a/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java +++ b/testing/trino-tests/src/test/java/io/trino/memory/TestClusterMemoryLeakDetector.java @@ -95,6 +95,7 @@ private static BasicQueryInfo createQueryInfo(String queryId, QueryState state) DataSize.valueOf("23GB"), DataSize.valueOf("23GB"), DataSize.valueOf("23GB"), + DataSize.valueOf("23GB"), 24, 25, DataSize.valueOf("26GB"), @@ -105,6 +106,9 @@ private static BasicQueryInfo createQueryInfo(String queryId, QueryState state) new Duration(31, MINUTES), new Duration(32, MINUTES), new Duration(33, MINUTES), + new Duration(34, MINUTES), + new Duration(35, MINUTES), + new Duration(36, MINUTES), true, ImmutableSet.of(WAITING_FOR_MEMORY), OptionalDouble.of(20),