blob: dc3d3f68bd6cf0cfb050ceb0daec18de8c51f690 [file] [log] [blame]
Zhuoyao Zhang11986e82024-09-09 22:22:52 +00001syntax = "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_RESOURCE_USAGE = 4;
20 FORCE_CLEANUP = 5;
21 }
22
23 // Event that logs a single edit
24 message SingleEditEvent {
25 // Full path of the file that edited.
26 string file_path = 1;
27 // Type of the edit.
28 EditType edit_type = 2;
29 }
30
31 // Event that logs aggregated info for a set of edits.
32 message AggregatedEditEvent {
33 int32 num_edits = 1;
34 }
35
36 // Event that logs errors happened in the edit monitor.
37 message EditMonitorErrorEvent {
38 ErrorType error_type = 1;
Zhuoyao Zhang11986e82024-09-09 22:22:52 +000039 }
40
41 // ------------------------
42 // FIELDS FOR EditEvent
43 // ------------------------
44 // Internal user name.
45 string user_name = 1;
46 // The root of Android source.
47 string source_root = 2;
48 // Name of the host workstation.
49 string host_name = 3;
50
51 oneof event {
52 SingleEditEvent single_edit_event = 4;
53 AggregatedEditEvent aggregated_edit_event = 5;
54 EditMonitorErrorEvent edit_monitor_error_event = 6;
55 }
56}