1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.bigtable.v2; 18 19import "google/protobuf/duration.proto"; 20 21option csharp_namespace = "Google.Cloud.Bigtable.V2"; 22option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; 23option java_multiple_files = true; 24option java_outer_classname = "RequestStatsProto"; 25option java_package = "com.google.bigtable.v2"; 26option php_namespace = "Google\\Cloud\\Bigtable\\V2"; 27option ruby_package = "Google::Cloud::Bigtable::V2"; 28 29// 30// Messages related to RequestStats, part of the Query Stats feature, that can 31// help understand the performance of requests. 32// 33// The layout of requests below is as follows: 34// * RequestStats serves as the top-level container for statistics and 35// measures related to Bigtable requests. This common object is returned as 36// part of methods in the Data API. 37// * RequestStats contains multiple *views* of related data, chosen by an 38// option in the source Data API method. The view that is returned is 39// designed to have all submessages (and their submessages, and so on) 40// filled-in, to provide a comprehensive selection of statistics and 41// measures related to the requested view. 42 43// ReadIterationStats captures information about the iteration of rows or cells 44// over the course of a read, e.g. how many results were scanned in a read 45// operation versus the results returned. 46message ReadIterationStats { 47 // The rows seen (scanned) as part of the request. This includes the count of 48 // rows returned, as captured below. 49 int64 rows_seen_count = 1; 50 51 // The rows returned as part of the request. 52 int64 rows_returned_count = 2; 53 54 // The cells seen (scanned) as part of the request. This includes the count of 55 // cells returned, as captured below. 56 int64 cells_seen_count = 3; 57 58 // The cells returned as part of the request. 59 int64 cells_returned_count = 4; 60} 61 62// RequestLatencyStats provides a measurement of the latency of the request as 63// it interacts with different systems over its lifetime, e.g. how long the 64// request took to execute within a frontend server. 65message RequestLatencyStats { 66 // The latency measured by the frontend server handling this request, from 67 // when the request was received, to when this value is sent back in the 68 // response. For more context on the component that is measuring this latency, 69 // see: https://cloud.google.com/bigtable/docs/overview 70 // 71 // Note: This value may be slightly shorter than the value reported into 72 // aggregate latency metrics in Monitoring for this request 73 // (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value 74 // needs to be sent in the response before the latency measurement including 75 // that transmission is finalized. 76 // 77 // Note: This value includes the end-to-end latency of contacting nodes in 78 // the targeted cluster, e.g. measuring from when the first byte arrives at 79 // the frontend server, to when this value is sent back as the last value in 80 // the response, including any latency incurred by contacting nodes, waiting 81 // for results from nodes, and finally sending results from nodes back to the 82 // caller. 83 google.protobuf.Duration frontend_server_latency = 1; 84} 85 86// FullReadStatsView captures all known information about a read. 87message FullReadStatsView { 88 // Iteration stats describe how efficient the read is, e.g. comparing 89 // rows seen vs. rows returned or cells seen vs cells returned can provide an 90 // indication of read efficiency (the higher the ratio of seen to retuned the 91 // better). 92 ReadIterationStats read_iteration_stats = 1; 93 94 // Request latency stats describe the time taken to complete a request, from 95 // the server side. 96 RequestLatencyStats request_latency_stats = 2; 97} 98 99// RequestStats is the container for additional information pertaining to a 100// single request, helpful for evaluating the performance of the sent request. 101// Currently, there are the following supported methods: 102// * google.bigtable.v2.ReadRows 103message RequestStats { 104 // Information pertaining to each request type received. The type is chosen 105 // based on the requested view. 106 // 107 // See the messages above for additional context. 108 oneof stats_view { 109 // Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL 110 // view, see package google.bigtable.v2. 111 FullReadStatsView full_read_stats_view = 1; 112 } 113} 114