1// Copyright 2021 Google Inc. All Rights Reserved. 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 soong_build_bp2build_metrics; 18option go_package = "android/soong/ui/metrics/bp2build_metrics_proto"; 19 20message Bp2BuildMetrics { 21 // Total number of Soong modules converted to generated targets 22 uint64 generatedModuleCount = 1; 23 24 // Total number of Soong modules converted to handcrafted targets 25 uint64 handCraftedModuleCount = 2; 26 27 // Total number of unconverted Soong modules 28 uint64 unconvertedModuleCount = 3; 29 30 // Counts of symlinks in synthetic bazel workspace 31 uint64 workspaceSymlinkCount= 9; 32 33 // Counts of mkdir calls during creation of synthetic bazel workspace 34 uint64 workspaceMkDirCount= 10; 35 36 // Counts of generated Bazel targets per Bazel rule class 37 map<string, uint64> ruleClassCount = 4; 38 39 // List of converted modules 40 repeated string convertedModules = 5; 41 42 // Counts of converted modules by module type. 43 map<string, uint64> convertedModuleTypeCount = 6; 44 45 // Counts of total modules by module type. 46 map<string, uint64> totalModuleTypeCount = 7; 47 48 // List of traced runtime events of bp2build, useful for tracking bp2build 49 // runtime. 50 repeated Event events = 8; 51} 52 53// Traced runtime event of bp2build. 54message Event { 55 // The event name. 56 string name = 1; 57 58 // The absolute start time of the event 59 // The number of nanoseconds elapsed since January 1, 1970 UTC. 60 uint64 start_time = 2; 61 62 // The real running time. 63 // The number of nanoseconds elapsed since start_time. 64 uint64 real_time = 3; 65} 66