github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/rowexec/stats.proto (about) 1 // Copyright 2019 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 syntax = "proto3"; 12 package cockroach.sql.distsqlrun; 13 option go_package = "rowexec"; 14 15 import "gogoproto/gogo.proto"; 16 import "google/protobuf/duration.proto"; 17 18 // InputStats represents the stats collected from an input. 19 message InputStats { 20 // num_rows is the number of rows received from the input. 21 int64 num_rows = 1; 22 // Duration in nanoseconds of the cumulative time spent stalled. 23 google.protobuf.Duration stall_time = 8 [(gogoproto.nullable) = false, 24 (gogoproto.stdduration) = true]; 25 } 26 27 // TableReaderStats are the stats collected during a tableReader run. 28 message TableReaderStats { 29 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 30 int64 bytes_read = 2; 31 } 32 33 // JoinReaderStats are the stats collected during a JoinReader run. 34 message JoinReaderStats { 35 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 36 InputStats index_lookup_stats = 2 [(gogoproto.nullable) = false]; 37 reserved 3; 38 } 39 40 // HashJoinerStats are the stats collected during a hashJoiner run. 41 message HashJoinerStats { 42 InputStats left_input_stats = 1 [(gogoproto.nullable) = false]; 43 InputStats right_input_stats = 2 [(gogoproto.nullable) = false]; 44 string stored_side = 3; 45 int64 max_allocated_mem = 4; 46 int64 max_allocated_disk = 5; 47 } 48 49 // AggregatorStats are the stats collected during an aggregator run. 50 message AggregatorStats { 51 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 52 int64 max_allocated_mem = 2; 53 } 54 55 // DistinctStats are the stats collected during a distinct run. 56 message DistinctStats { 57 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 58 int64 max_allocated_mem = 2; 59 } 60 61 // OrdinalityStats are the stats collected during a WITH ORDINALITY run. 62 message OrdinalityStats { 63 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 64 } 65 66 // MergeJoinerStats are the stats collected during a mergeJoiner run. 67 message MergeJoinerStats { 68 InputStats left_input_stats = 1 [(gogoproto.nullable) = false]; 69 InputStats right_input_stats = 2 [(gogoproto.nullable) = false]; 70 int64 max_allocated_mem = 3; 71 } 72 73 // SorterStats are the stats collected during a sorter run. 74 message SorterStats { 75 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 76 int64 max_allocated_mem = 2; 77 int64 max_allocated_disk = 3; 78 } 79 80 // WindowerStats are the stats collected during a windower run. 81 message WindowerStats { 82 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 83 int64 max_allocated_mem = 2; 84 int64 max_allocated_disk = 3; 85 } 86 87 // InvertedFiltererStats are the stats collected during an inverted 88 // filterer run. 89 message InvertedFiltererStats { 90 InputStats input_stats = 1 [(gogoproto.nullable) = false]; 91 int64 max_allocated_mem = 2; 92 int64 max_allocated_disk = 3; 93 }