objdiff/objdiff-cli/protos/report.proto

136 lines
3.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package objdiff.report;
2024-08-18 19:42:41 +00:00
// Progress info for a report or unit
message Measures {
// Overall match percent, including partially matched functions and data
float fuzzy_match_percent = 1;
2024-08-18 19:42:41 +00:00
// Total size of code in bytes
uint64 total_code = 2;
2024-08-18 19:42:41 +00:00
// Fully matched code size in bytes
uint64 matched_code = 3;
2024-08-18 19:42:41 +00:00
// Fully matched code percent
float matched_code_percent = 4;
2024-08-18 19:42:41 +00:00
// Total size of data in bytes
uint64 total_data = 5;
2024-08-18 19:42:41 +00:00
// Fully matched data size in bytes
uint64 matched_data = 6;
2024-08-18 19:42:41 +00:00
// Fully matched data percent
float matched_data_percent = 7;
2024-08-18 19:42:41 +00:00
// Total number of functions
uint32 total_functions = 8;
2024-08-18 19:42:41 +00:00
// Fully matched functions
uint32 matched_functions = 9;
2024-08-18 19:42:41 +00:00
// Fully matched functions percent
float matched_functions_percent = 10;
}
2024-08-18 19:42:41 +00:00
// Project progress report
message Report {
// Overall progress info
Measures measures = 1;
// Units within this report
repeated ReportUnit units = 2;
}
// A unit of the report (usually a translation unit)
message ReportUnit {
2024-08-18 19:42:41 +00:00
// The name of the unit
string name = 1;
2024-08-18 19:42:41 +00:00
// Progress info for this unit
Measures measures = 2;
// Sections within this unit
repeated ReportItem sections = 3;
// Functions within this unit
repeated ReportItem functions = 4;
// Extra metadata for this unit
optional ReportUnitMetadata metadata = 5;
}
2024-08-18 19:42:41 +00:00
// Extra metadata for a unit
message ReportUnitMetadata {
// Whether this unit is marked as complete (or "linked")
optional bool complete = 1;
// The name of the module this unit belongs to
optional string module_name = 2;
// The ID of the module this unit belongs to
optional uint32 module_id = 3;
// The path to the source file of this unit
optional string source_path = 4;
}
// A section or function within a unit
message ReportItem {
2024-08-18 19:42:41 +00:00
// The name of the item
string name = 1;
2024-08-18 19:42:41 +00:00
// The size of the item in bytes
uint64 size = 2;
2024-08-18 19:42:41 +00:00
// The overall match percent for this item
float fuzzy_match_percent = 3;
2024-08-18 19:42:41 +00:00
// Extra metadata for this item
optional ReportItemMetadata metadata = 4;
}
// Extra metadata for an item
message ReportItemMetadata {
// The demangled name of the function
optional string demangled_name = 1;
// The virtual address of the function or section
optional uint64 virtual_address = 2;
}
2024-08-18 19:42:41 +00:00
// A pair of reports to compare and generate changes
message ChangesInput {
2024-08-18 19:42:41 +00:00
// The previous report
Report from = 1;
2024-08-18 19:42:41 +00:00
// The current report
Report to = 2;
}
2024-08-18 19:42:41 +00:00
// Changes between two reports
message Changes {
2024-08-18 19:42:41 +00:00
// The progress info for the previous report
Measures from = 1;
// The progress info for the current report
Measures to = 2;
// Units that changed
repeated ChangeUnit units = 3;
}
2024-08-18 19:42:41 +00:00
// A changed unit
message ChangeUnit {
2024-08-18 19:42:41 +00:00
// The name of the unit
string name = 1;
2024-08-18 19:42:41 +00:00
// The previous progress info (omitted if new)
optional Measures from = 2;
// The current progress info (omitted if removed)
optional Measures to = 3;
// Sections that changed
repeated ChangeItem sections = 4;
2024-08-18 19:42:41 +00:00
// Functions that changed
repeated ChangeItem functions = 5;
2024-08-18 19:42:41 +00:00
// Extra metadata for this unit
optional ReportUnitMetadata metadata = 6;
}
2024-08-18 19:42:41 +00:00
// A changed section or function
message ChangeItem {
2024-08-18 19:42:41 +00:00
// The name of the item
string name = 1;
2024-08-18 19:42:41 +00:00
// The previous progress info (omitted if new)
optional ChangeItemInfo from = 2;
2024-08-18 19:42:41 +00:00
// The current progress info (omitted if removed)
optional ChangeItemInfo to = 3;
2024-08-18 19:42:41 +00:00
// Extra metadata for this item
optional ReportItemMetadata metadata = 4;
}
2024-08-18 19:42:41 +00:00
// Progress info for a section or function
message ChangeItemInfo {
2024-08-18 19:42:41 +00:00
// The overall match percent for this item
float fuzzy_match_percent = 1;
2024-08-18 19:42:41 +00:00
// The size of the item in bytes
uint64 size = 2;
2024-08-18 19:42:41 +00:00
}