|
| 1 | +// From https://github.com/encounter/objdiff/blob/main/objdiff-core/protos/report.proto |
| 2 | + |
| 3 | +syntax = "proto3"; |
| 4 | + |
| 5 | +package objdiff.report; |
| 6 | + |
| 7 | +// Project progress report |
| 8 | +message Report { |
| 9 | + // Overall progress info |
| 10 | + Measures measures = 1; |
| 11 | + // Units within this report |
| 12 | + repeated ReportUnit units = 2; |
| 13 | + // Report version |
| 14 | + uint32 version = 3; |
| 15 | + // Progress categories |
| 16 | + repeated ReportCategory categories = 4; |
| 17 | +} |
| 18 | + |
| 19 | +// Progress info for a report or unit |
| 20 | +message Measures { |
| 21 | + // Overall match percent, including partially matched functions and data |
| 22 | + float fuzzy_match_percent = 1; |
| 23 | + // Total size of code in bytes |
| 24 | + uint64 total_code = 2; |
| 25 | + // Fully matched code size in bytes |
| 26 | + uint64 matched_code = 3; |
| 27 | + // Fully matched code percent |
| 28 | + float matched_code_percent = 4; |
| 29 | + // Total size of data in bytes |
| 30 | + uint64 total_data = 5; |
| 31 | + // Fully matched data size in bytes |
| 32 | + uint64 matched_data = 6; |
| 33 | + // Fully matched data percent |
| 34 | + float matched_data_percent = 7; |
| 35 | + // Total number of functions |
| 36 | + uint32 total_functions = 8; |
| 37 | + // Fully matched functions |
| 38 | + uint32 matched_functions = 9; |
| 39 | + // Fully matched functions percent |
| 40 | + float matched_functions_percent = 10; |
| 41 | + // Completed (or "linked") code size in bytes |
| 42 | + uint64 complete_code = 11; |
| 43 | + // Completed (or "linked") code percent |
| 44 | + float complete_code_percent = 12; |
| 45 | + // Completed (or "linked") data size in bytes |
| 46 | + uint64 complete_data = 13; |
| 47 | + // Completed (or "linked") data percent |
| 48 | + float complete_data_percent = 14; |
| 49 | + // Total number of units |
| 50 | + uint32 total_units = 15; |
| 51 | + // Completed (or "linked") units |
| 52 | + uint32 complete_units = 16; |
| 53 | +} |
| 54 | + |
| 55 | +message ReportCategory { |
| 56 | + // The ID of the category |
| 57 | + string id = 1; |
| 58 | + // The name of the category |
| 59 | + string name = 2; |
| 60 | + // Progress info for this category |
| 61 | + Measures measures = 3; |
| 62 | +} |
| 63 | + |
| 64 | +// A unit of the report (usually a translation unit) |
| 65 | +message ReportUnit { |
| 66 | + // The name of the unit |
| 67 | + string name = 1; |
| 68 | + // Progress info for this unit |
| 69 | + Measures measures = 2; |
| 70 | + // Sections within this unit |
| 71 | + repeated ReportItem sections = 3; |
| 72 | + // Functions within this unit |
| 73 | + repeated ReportItem functions = 4; |
| 74 | + // Extra metadata for this unit |
| 75 | + optional ReportUnitMetadata metadata = 5; |
| 76 | +} |
| 77 | + |
| 78 | +// Extra metadata for a unit |
| 79 | +message ReportUnitMetadata { |
| 80 | + // Whether this unit is marked as complete (or "linked") |
| 81 | + optional bool complete = 1; |
| 82 | + // The name of the module this unit belongs to |
| 83 | + optional string module_name = 2; |
| 84 | + // The ID of the module this unit belongs to |
| 85 | + optional uint32 module_id = 3; |
| 86 | + // The path to the source file of this unit |
| 87 | + optional string source_path = 4; |
| 88 | + // Progress categories for this unit |
| 89 | + repeated string progress_categories = 5; |
| 90 | + // Whether this unit is automatically generated (not user-provided) |
| 91 | + optional bool auto_generated = 6; |
| 92 | +} |
| 93 | + |
| 94 | +// A section or function within a unit |
| 95 | +message ReportItem { |
| 96 | + // The name of the item |
| 97 | + string name = 1; |
| 98 | + // The size of the item in bytes |
| 99 | + uint64 size = 2; |
| 100 | + // The overall match percent for this item |
| 101 | + float fuzzy_match_percent = 3; |
| 102 | + // Extra metadata for this item |
| 103 | + optional ReportItemMetadata metadata = 4; |
| 104 | + // Address of the item (section-relative offset) |
| 105 | + optional uint64 address = 5; |
| 106 | +} |
| 107 | + |
| 108 | +// Extra metadata for an item |
| 109 | +message ReportItemMetadata { |
| 110 | + // The demangled name of the function |
| 111 | + optional string demangled_name = 1; |
| 112 | + // The virtual address of the function or section |
| 113 | + optional uint64 virtual_address = 2; |
| 114 | +} |
0 commit comments