@@ -2,84 +2,134 @@ syntax = "proto3";
22
33package objdiff.report ;
44
5- message Report {
5+ // Progress info for a report or unit
6+ message Measures {
7+ // Overall match percent, including partially matched functions and data
68 float fuzzy_match_percent = 1 ;
9+ // Total size of code in bytes
710 uint64 total_code = 2 ;
11+ // Fully matched code size in bytes
812 uint64 matched_code = 3 ;
13+ // Fully matched code percent
914 float matched_code_percent = 4 ;
15+ // Total size of data in bytes
1016 uint64 total_data = 5 ;
17+ // Fully matched data size in bytes
1118 uint64 matched_data = 6 ;
19+ // Fully matched data percent
1220 float matched_data_percent = 7 ;
21+ // Total number of functions
1322 uint32 total_functions = 8 ;
23+ // Fully matched functions
1424 uint32 matched_functions = 9 ;
25+ // Fully matched functions percent
1526 float matched_functions_percent = 10 ;
16- repeated ReportUnit units = 11 ;
1727}
1828
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)
1938message ReportUnit {
39+ // The name of the unit
2040 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 ;
3349}
3450
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
3564message ReportItem {
65+ // The name of the item
3666 string name = 1 ;
67+ // The size of the item in bytes
3768 uint64 size = 2 ;
69+ // The overall match percent for this item
3870 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 ;
4181}
4282
43- // Used as stdin for the changes command
83+ // A pair of reports to compare and generate changes
4484message ChangesInput {
85+ // The previous report
4586 Report from = 1 ;
87+ // The current report
4688 Report to = 2 ;
4789}
4890
91+ // Changes between two reports
4992message 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
5298 repeated ChangeUnit units = 3 ;
5399}
54100
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
68102message ChangeUnit {
103+ // The name of the unit
69104 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
72110 repeated ChangeItem sections = 4 ;
111+ // Functions that changed
73112 repeated ChangeItem functions = 5 ;
113+ // Extra metadata for this unit
114+ optional ReportUnitMetadata metadata = 6 ;
74115}
75116
117+ // A changed section or function
76118message ChangeItem {
119+ // The name of the item
77120 string name = 1 ;
121+ // The previous progress info (omitted if new)
78122 optional ChangeItemInfo from = 2 ;
123+ // The current progress info (omitted if removed)
79124 optional ChangeItemInfo to = 3 ;
125+ // Extra metadata for this item
126+ optional ReportItemMetadata metadata = 4 ;
80127}
81128
129+ // Progress info for a section or function
82130message ChangeItemInfo {
131+ // The overall match percent for this item
83132 float fuzzy_match_percent = 1 ;
133+ // The size of the item in bytes
84134 uint64 size = 2 ;
85- }
135+ }
0 commit comments