File: internal_user_log.proto

package info (click to toggle)
android-cuttlefish 1.0.1-0~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,192 kB
  • sloc: cpp: 39,149; sh: 2,523; javascript: 242; exp: 152; python: 125; makefile: 88
file content (115 lines) | stat: -rw-r--r-- 3,502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
 syntax = "proto2";

package cuttlefish;

message Duration {
  required int64 seconds = 1;
  required int32 nanos = 2;
}

//TODO(moelsherif) : This message is not used yet
enum UserType {
  GOOGLE = 0;
  EXTERNAL = 1;
}

// Proto used by Atest CLI Tool for Internal PII Users
message AtestLogEventInternal {
  // ------------------------
  // EVENT DEFINITIONS
  // ------------------------
  // Occurs immediately upon execution of atest
  message AtestStartEvent {
    optional string command_line = 1;
    repeated string test_references = 2;
    optional string cwd = 3;
    optional string os = 4;
  }

  // Occurs when atest exits for any reason
  message AtestExitEvent {
    optional Duration duration = 1;
    optional int32 exit_code = 2;
    optional string stacktrace = 3;
    optional string logs = 4;
  }

  // Occurs after a SINGLE test reference has been resolved to a test or
  // not found
  message FindTestFinishEvent {
    optional Duration duration = 1;
    optional bool success = 2;
    optional string test_reference = 3
       ;
    repeated string test_finders = 4;
    optional string test_info = 5;
  }

  // Occurs after the build finishes, either successfully or not.
  message BuildFinishEvent {
    optional Duration duration = 1;
    optional bool success = 2;
    repeated string targets = 3;
  }

  // Occurs when a single test runner has completed
  message RunnerFinishEvent {
    optional Duration duration = 1;
    optional bool success = 2;
    optional string runner_name = 3;
    message Test {
      optional string name = 1;
      optional int32 result = 2;
      optional string stacktrace = 3;
    }
    repeated Test test = 4;
  }

  // Occurs after all test runners and tests have finished
  message RunTestsFinishEvent {
    optional Duration duration = 1;
  }
  // Occurs after detection of catching bug by atest have finished
  message LocalDetectEvent {
    optional int32 detect_type = 1;
    optional int32 result = 2;
  }

  // ------------------------
  // FIELDS FOR ATESTLOGEVENT
  // ------------------------
  // user_key and run_id are both python uuid.uuid4() completely anonymous
  // and random hexadecimal strings. We cannot use normal google ids
  // (zwieback, gaia, etc) because we are an open source command line tool.
  // uuid4 provides us a unique key for grouping, which is all we need.
  optional string user_key = 1 ;
  optional string run_id = 2 ;
  optional UserType user_type = 3;
  optional string tool_name = 10;
  optional string sub_tool_name = 12;
  oneof event {
    AtestStartEvent atest_start_event = 4;
    AtestExitEvent atest_exit_event = 5;
    FindTestFinishEvent find_test_finish_event = 6;
    BuildFinishEvent build_finish_event = 7;
    RunnerFinishEvent runner_finish_event = 8;
    RunTestsFinishEvent run_tests_finish_event = 9;
    LocalDetectEvent local_detect_event = 11;
  }
}