@@ -2,84 +2,134 @@ syntax = "proto3";
2
2
3
3
package objdiff.report ;
4
4
5
- message Report {
5
+ // Progress info for a report or unit
6
+ message Measures {
7
+ // Overall match percent, including partially matched functions and data
6
8
float fuzzy_match_percent = 1 ;
9
+ // Total size of code in bytes
7
10
uint64 total_code = 2 ;
11
+ // Fully matched code size in bytes
8
12
uint64 matched_code = 3 ;
13
+ // Fully matched code percent
9
14
float matched_code_percent = 4 ;
15
+ // Total size of data in bytes
10
16
uint64 total_data = 5 ;
17
+ // Fully matched data size in bytes
11
18
uint64 matched_data = 6 ;
19
+ // Fully matched data percent
12
20
float matched_data_percent = 7 ;
21
+ // Total number of functions
13
22
uint32 total_functions = 8 ;
23
+ // Fully matched functions
14
24
uint32 matched_functions = 9 ;
25
+ // Fully matched functions percent
15
26
float matched_functions_percent = 10 ;
16
- repeated ReportUnit units = 11 ;
17
27
}
18
28
29
+ // Project progress report
30
+ message Report {
31
+ // Overall progress info
32
+ Measures measures = 1 ;
33
+ // Units within this report
34
+ repeated ReportUnit units = 2 ;
35
+ }
36
+
37
+ // A unit of the report (usually a translation unit)
19
38
message ReportUnit {
39
+ // The name of the unit
20
40
string name = 1 ;
21
- float fuzzy_match_percent = 2 ;
22
- uint64 total_code = 3 ;
23
- uint64 matched_code = 4 ;
24
- uint64 total_data = 5 ;
25
- uint64 matched_data = 6 ;
26
- uint32 total_functions = 7 ;
27
- uint32 matched_functions = 8 ;
28
- optional bool complete = 9 ;
29
- optional string module_name = 10 ;
30
- optional uint32 module_id = 11 ;
31
- repeated ReportItem sections = 12 ;
32
- repeated ReportItem functions = 13 ;
41
+ // Progress info for this unit
42
+ Measures measures = 2 ;
43
+ // Sections within this unit
44
+ repeated ReportItem sections = 3 ;
45
+ // Functions within this unit
46
+ repeated ReportItem functions = 4 ;
47
+ // Extra metadata for this unit
48
+ optional ReportUnitMetadata metadata = 5 ;
33
49
}
34
50
51
+ // Extra metadata for a unit
52
+ message ReportUnitMetadata {
53
+ // Whether this unit is marked as complete (or "linked")
54
+ optional bool complete = 1 ;
55
+ // The name of the module this unit belongs to
56
+ optional string module_name = 2 ;
57
+ // The ID of the module this unit belongs to
58
+ optional uint32 module_id = 3 ;
59
+ // The path to the source file of this unit
60
+ optional string source_path = 4 ;
61
+ }
62
+
63
+ // A section or function within a unit
35
64
message ReportItem {
65
+ // The name of the item
36
66
string name = 1 ;
67
+ // The size of the item in bytes
37
68
uint64 size = 2 ;
69
+ // The overall match percent for this item
38
70
float fuzzy_match_percent = 3 ;
39
- optional string demangled_name = 4 ;
40
- optional uint64 address = 5 ;
71
+ // Extra metadata for this item
72
+ optional ReportItemMetadata metadata = 4 ;
73
+ }
74
+
75
+ // Extra metadata for an item
76
+ message ReportItemMetadata {
77
+ // The demangled name of the function
78
+ optional string demangled_name = 1 ;
79
+ // The virtual address of the function or section
80
+ optional uint64 virtual_address = 2 ;
41
81
}
42
82
43
- // Used as stdin for the changes command
83
+ // A pair of reports to compare and generate changes
44
84
message ChangesInput {
85
+ // The previous report
45
86
Report from = 1 ;
87
+ // The current report
46
88
Report to = 2 ;
47
89
}
48
90
91
+ // Changes between two reports
49
92
message Changes {
50
- ChangeInfo from = 1 ;
51
- ChangeInfo to = 2 ;
93
+ // The progress info for the previous report
94
+ Measures from = 1 ;
95
+ // The progress info for the current report
96
+ Measures to = 2 ;
97
+ // Units that changed
52
98
repeated ChangeUnit units = 3 ;
53
99
}
54
100
55
- message ChangeInfo {
56
- float fuzzy_match_percent = 1 ;
57
- uint64 total_code = 2 ;
58
- uint64 matched_code = 3 ;
59
- float matched_code_percent = 4 ;
60
- uint64 total_data = 5 ;
61
- uint64 matched_data = 6 ;
62
- float matched_data_percent = 7 ;
63
- uint32 total_functions = 8 ;
64
- uint32 matched_functions = 9 ;
65
- float matched_functions_percent = 10 ;
66
- }
67
-
101
+ // A changed unit
68
102
message ChangeUnit {
103
+ // The name of the unit
69
104
string name = 1 ;
70
- optional ChangeInfo from = 2 ;
71
- optional ChangeInfo to = 3 ;
105
+ // The previous progress info (omitted if new)
106
+ optional Measures from = 2 ;
107
+ // The current progress info (omitted if removed)
108
+ optional Measures to = 3 ;
109
+ // Sections that changed
72
110
repeated ChangeItem sections = 4 ;
111
+ // Functions that changed
73
112
repeated ChangeItem functions = 5 ;
113
+ // Extra metadata for this unit
114
+ optional ReportUnitMetadata metadata = 6 ;
74
115
}
75
116
117
+ // A changed section or function
76
118
message ChangeItem {
119
+ // The name of the item
77
120
string name = 1 ;
121
+ // The previous progress info (omitted if new)
78
122
optional ChangeItemInfo from = 2 ;
123
+ // The current progress info (omitted if removed)
79
124
optional ChangeItemInfo to = 3 ;
125
+ // Extra metadata for this item
126
+ optional ReportItemMetadata metadata = 4 ;
80
127
}
81
128
129
+ // Progress info for a section or function
82
130
message ChangeItemInfo {
131
+ // The overall match percent for this item
83
132
float fuzzy_match_percent = 1 ;
133
+ // The size of the item in bytes
84
134
uint64 size = 2 ;
85
- }
135
+ }
0 commit comments