xref: /aosp_15_r20/external/federated-compute/fcp/tracing/test/tracing_schema.fbs (revision 14675a029014e728ec732f129a32e299b2da0601)
1// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15include "fcp/tracing/tracing_schema_common.fbs";
16
17table SpanWithId (tag: "SWID", span) {
18  id: int32;
19}
20
21table SpanWithNoData (tag: "SWND", span) {
22}
23
24table SpanNeverLogged (tag: "SNLG", span) {
25}
26
27table EventFoo (tag: "EFOO") {
28  first: int32;
29  second: int32;
30}
31
32table EventBar (tag: "EBAR") {
33  first: int32;
34  second: string;
35}
36
37table EventWithNoData (warning, tag: "EVND") {
38}
39
40table EventNeverLogged (tag: "ENLG") {
41}
42
43table ErrorEvent (error, tag: "EERR") {
44  cause: string;
45}
46
47table DeprecatedInt (tag: "DEPI") {
48  first: int32 (deprecated);
49  second: int32;
50}
51
52table AllTypes (tag: "ALLT") {
53  fieldz: byte;
54  fieldy: ubyte;
55  fieldx: bool;
56  fieldw: short;
57  fieldv: ushort;
58  fieldu: int;
59  fieldt: uint;
60  fields: float;
61  fieldr: long;
62  fieldq: ulong;
63  fieldp: double;
64  fieldo: string;
65}
66
67table FieldOrder (tag: "FORD") {
68  fieldz: int;
69  fieldy: int;
70  fieldx: string;
71}
72
73table OrderWithIds (tag: "ORDI") {
74  fieldz: int (id: 1);
75  fieldy: int (id: 2);
76  fieldx: string (id: 0);
77}
78
79enum Color : byte { Red = 0, Green = 1, Blue = 2 }
80
81table ColorEnum (tag: "CLEN") {
82  color: Color;
83}
84