1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.devtools.resultstore.v2;
20 import "google/devtools/resultstore/v2/common.proto";
22 option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
23 option java_multiple_files = true;
24 option java_package = "com.google.devtools.resultstore.v2";
26 // Summary of line coverage
27 message LineCoverageSummary {
28 // Number of lines instrumented for coverage.
29 int32 instrumented_line_count = 1;
31 // Number of instrumented lines that were executed by the test.
32 int32 executed_line_count = 2;
35 // Summary of branch coverage
37 // * not executed. Counted only in total.
38 // * executed but not taken. Appears in total and executed.
39 // * executed and taken. Appears in all three fields.
40 message BranchCoverageSummary {
41 // The number of branches present in the file.
42 int32 total_branch_count = 1;
44 // The number of branches executed out of the total branches present.
45 // A branch is executed when its condition is evaluated.
46 // This is <= total_branch_count as not all branches are executed.
47 int32 executed_branch_count = 2;
49 // The number of branches taken out of the total branches executed.
50 // A branch is taken when its condition is satisfied.
51 // This is <= executed_branch_count as not all executed branches are taken.
52 int32 taken_branch_count = 3;
55 // Summary of coverage in each language
56 message LanguageCoverageSummary {
57 // This summary is for all files written in this programming language.
58 Language language = 1;
60 // Summary of lines covered vs instrumented.
61 LineCoverageSummary line_summary = 2;
63 // Summary of branch coverage.
64 BranchCoverageSummary branch_summary = 3;