github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/logqlmodel/stats/stats.proto (about) 1 syntax = "proto3"; 2 3 package stats; 4 5 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 6 7 option go_package = "github.com/grafana/loki/pkg/logqlmodel/stats"; 8 option (gogoproto.marshaler_all) = true; 9 option (gogoproto.unmarshaler_all) = true; 10 11 // Result contains LogQL query statistics. 12 message Result { 13 Summary summary = 1 [ 14 (gogoproto.nullable) = false, 15 (gogoproto.jsontag) = "summary" 16 ]; 17 Querier querier = 2 [ 18 (gogoproto.nullable) = false, 19 (gogoproto.jsontag) = "querier" 20 ]; 21 Ingester ingester = 3 [ 22 (gogoproto.nullable) = false, 23 (gogoproto.jsontag) = "ingester" 24 ]; 25 Caches caches = 4 [ 26 (gogoproto.nullable) = false, 27 (gogoproto.jsontag) = "cache" 28 ]; 29 } 30 31 message Caches { 32 Cache chunk = 1 [ 33 (gogoproto.nullable) = false, 34 (gogoproto.jsontag) = "chunk" 35 ]; 36 Cache index = 2 [ 37 (gogoproto.nullable) = false, 38 (gogoproto.jsontag) = "index" 39 ]; 40 Cache result = 3 [ 41 (gogoproto.nullable) = false, 42 (gogoproto.jsontag) = "result" 43 ]; 44 } 45 46 // Summary is the summary of a query statistics. 47 message Summary { 48 // Total bytes processed per second. 49 int64 bytesProcessedPerSecond = 1 [(gogoproto.jsontag) = "bytesProcessedPerSecond"]; 50 // Total lines processed per second. 51 int64 linesProcessedPerSecond = 2 [(gogoproto.jsontag) = "linesProcessedPerSecond"]; 52 // Total bytes processed. 53 int64 totalBytesProcessed = 3 [(gogoproto.jsontag) = "totalBytesProcessed"]; 54 // Total lines processed. 55 int64 totalLinesProcessed = 4 [(gogoproto.jsontag) = "totalLinesProcessed"]; 56 // Execution time in seconds. 57 // In addition to internal calculations this is also returned by the HTTP API. 58 // Grafana expects time values to be returned in seconds as float. 59 double execTime = 5 [(gogoproto.jsontag) = "execTime"]; 60 // Queue time in seconds. 61 // In addition to internal calculations this is also returned by the HTTP API. 62 // Grafana expects time values to be returned in seconds as float. 63 double queueTime = 6 [(gogoproto.jsontag) = "queueTime"]; 64 // Total of subqueries created to fulfill this query. 65 int64 subqueries = 7 [(gogoproto.jsontag) = "subqueries"]; 66 // Total number of result entries returned 67 int64 totalEntriesReturned = 8 [(gogoproto.jsontag) = "totalEntriesReturned"]; 68 } 69 70 message Querier { 71 Store store = 1 [ 72 (gogoproto.nullable) = false, 73 (gogoproto.jsontag) = "store" 74 ]; 75 } 76 77 message Ingester { 78 // Total ingester reached for this query. 79 int32 totalReached = 1 [(gogoproto.jsontag) = "totalReached"]; 80 // Total of chunks matched by the query from ingesters 81 int64 totalChunksMatched = 2 [(gogoproto.jsontag) = "totalChunksMatched"]; 82 // Total of batches sent from ingesters. 83 int64 totalBatches = 3 [(gogoproto.jsontag) = "totalBatches"]; 84 // Total lines sent by ingesters. 85 int64 totalLinesSent = 4 [(gogoproto.jsontag) = "totalLinesSent"]; 86 87 Store store = 5 [ 88 (gogoproto.nullable) = false, 89 (gogoproto.jsontag) = "store" 90 ]; 91 } 92 93 message Store { 94 // The total of chunk reference fetched from index. 95 int64 totalChunksRef = 1 [(gogoproto.jsontag) = "totalChunksRef"]; 96 // Total number of chunks fetched. 97 int64 totalChunksDownloaded = 2 [(gogoproto.jsontag) = "totalChunksDownloaded"]; 98 // Time spent fetching chunks in nanoseconds. 99 int64 chunksDownloadTime = 3 [(gogoproto.jsontag) = "chunksDownloadTime"]; 100 101 Chunk chunk = 4 [ 102 (gogoproto.nullable) = false, 103 (gogoproto.jsontag) = "chunk" 104 ]; 105 } 106 107 message Chunk { 108 // Total bytes processed but was already in memory. (found in the headchunk) 109 int64 headChunkBytes = 4 [(gogoproto.jsontag) = "headChunkBytes"]; 110 // Total lines processed but was already in memory. (found in the headchunk) 111 int64 headChunkLines = 5 [(gogoproto.jsontag) = "headChunkLines"]; 112 // Total bytes decompressed and processed from chunks. 113 int64 decompressedBytes = 6 [(gogoproto.jsontag) = "decompressedBytes"]; 114 // Total lines decompressed and processed from chunks. 115 int64 decompressedLines = 7 [(gogoproto.jsontag) = "decompressedLines"]; 116 // Total bytes of compressed chunks (blocks) processed. 117 int64 compressedBytes = 8 [(gogoproto.jsontag) = "compressedBytes"]; 118 // Total duplicates found while processing. 119 int64 totalDuplicates = 9 [(gogoproto.jsontag) = "totalDuplicates"]; 120 } 121 122 message Cache { 123 int32 entriesFound = 1 [(gogoproto.jsontag) = "entriesFound"]; 124 int32 entriesRequested = 2 [(gogoproto.jsontag) = "entriesRequested"]; 125 int32 entriesStored = 3 [(gogoproto.jsontag) = "entriesStored"]; 126 int64 bytesReceived = 4 [(gogoproto.jsontag) = "bytesReceived"]; 127 int64 bytesSent = 5 [(gogoproto.jsontag) = "bytesSent"]; 128 int32 requests = 6 [(gogoproto.jsontag) = "requests"]; 129 }