1syntax = "proto3"; 2 3package tools.asuite.edit_monitor; 4 5message EditEvent { 6 enum EditType { 7 UNSUPPORTED_TYPE = 0; 8 CREATE = 1; 9 MODIFY = 2; 10 DELETE = 3; 11 MOVE = 4; 12 } 13 14 enum ErrorType { 15 UNKNOWN_ERROR = 0; 16 FAILED_TO_START_EDIT_MONITOR = 1; 17 FAILED_TO_STOP_EDIT_MONITOR = 2; 18 FAILED_TO_REBOOT_EDIT_MONITOR = 3; 19 KILLED_DUE_TO_EXCEEDED_MEMORY_USAGE = 4; 20 FORCE_CLEANUP = 5; 21 KILLED_DUE_TO_EXCEEDED_CPU_USAGE = 6; 22 } 23 24 // Event that logs a single edit 25 message SingleEditEvent { 26 // Full path of the file that edited. 27 string file_path = 1; 28 // Type of the edit. 29 EditType edit_type = 2; 30 } 31 32 // Event that logs aggregated info for a set of edits. 33 message AggregatedEditEvent { 34 int32 num_edits = 1; 35 } 36 37 // Event that logs errors happened in the edit monitor. 38 message EditMonitorErrorEvent { 39 ErrorType error_type = 1; 40 } 41 42 // ------------------------ 43 // FIELDS FOR EditEvent 44 // ------------------------ 45 // Internal user name. 46 string user_name = 1; 47 // The root of Android source. 48 string source_root = 2; 49 // Name of the host workstation. 50 string host_name = 3; 51 52 oneof event { 53 SingleEditEvent single_edit_event = 4; 54 AggregatedEditEvent aggregated_edit_event = 5; 55 EditMonitorErrorEvent edit_monitor_error_event = 6; 56 } 57} 58