1// Copyright 2023 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.cloud.datacatalog.v1beta1; 18 19import "google/protobuf/timestamp.proto"; 20 21option cc_enable_arenas = true; 22option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; 23option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb"; 24option java_multiple_files = true; 25option java_package = "com.google.cloud.datacatalog.v1beta1"; 26option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; 27option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; 28 29// Detailed counts on the entry's usage. 30// Caveats: 31// - Only BigQuery tables have usage stats 32// - The usage stats only include BigQuery query jobs 33// - The usage stats might be underestimated, e.g. wildcard table references 34// are not yet counted in usage computation 35// https://cloud.google.com/bigquery/docs/querying-wildcard-tables 36message UsageStats { 37 // The number of times that the underlying entry was successfully used. 38 float total_completions = 1; 39 40 // The number of times that the underlying entry was attempted to be used 41 // but failed. 42 float total_failures = 2; 43 44 // The number of times that the underlying entry was attempted to be used 45 // but was cancelled by the user. 46 float total_cancellations = 3; 47 48 // Total time spent (in milliseconds) during uses the resulted in completions. 49 float total_execution_time_for_completions_millis = 4; 50} 51 52// The set of all usage signals that we store in Data Catalog. 53message UsageSignal { 54 // The timestamp of the end of the usage statistics duration. 55 google.protobuf.Timestamp update_time = 1; 56 57 // Usage statistics over each of the pre-defined time ranges, supported 58 // strings for time ranges are {"24H", "7D", "30D"}. 59 map<string, UsageStats> usage_within_time_range = 2; 60} 61