usage.proto 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.cloud.datacatalog.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/protobuf/timestamp.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Cloud.DataCatalog.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog";
  21. option java_multiple_files = true;
  22. option java_package = "com.google.cloud.datacatalog.v1";
  23. option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
  24. option ruby_package = "Google::Cloud::DataCatalog::V1";
  25. // Detailed statistics on the entry's usage.
  26. //
  27. // Usage statistics have the following limitations:
  28. //
  29. // - Only BigQuery tables have them.
  30. // - They only include BigQuery query jobs.
  31. // - They might be underestimated because wildcard table references
  32. // are not yet counted. For more information, see
  33. // [Querying multiple tables using a wildcard table]
  34. // (https://cloud.google.com/bigquery/docs/querying-wildcard-tables)
  35. message UsageStats {
  36. // The number of successful uses of the underlying entry.
  37. float total_completions = 1;
  38. // The number of failed attempts to use the underlying entry.
  39. float total_failures = 2;
  40. // The number of cancelled attempts to use the underlying entry.
  41. float total_cancellations = 3;
  42. // Total time spent only on successful uses, in milliseconds.
  43. float total_execution_time_for_completions_millis = 4;
  44. }
  45. // The set of all usage signals that Data Catalog stores.
  46. //
  47. // Note: Usually, these signals are updated daily. In rare cases, an update may
  48. // fail but will be performed again on the next day.
  49. message UsageSignal {
  50. // The end timestamp of the duration of usage statistics.
  51. google.protobuf.Timestamp update_time = 1;
  52. // Output only. BigQuery usage statistics over each of the predefined time ranges.
  53. //
  54. // Supported time ranges are `{"24H", "7D", "30D"}`.
  55. map<string, UsageStats> usage_within_time_range = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  56. }