request_stats.proto 4.9 KB

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