perfetto-protos
Version:
Perfetto protos exposed via protobuf-es for browser and node
348 lines (317 loc) • 11.6 kB
text/typescript
//
// Copyright (C) 2019 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.
// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/trace/track_event/debug_annotation.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file protos/perfetto/trace/track_event/debug_annotation.proto.
*/
export const file_protos_perfetto_trace_track_event_debug_annotation: GenFile = /*@__PURE__*/
fileDesc("Cjhwcm90b3MvcGVyZmV0dG8vdHJhY2UvdHJhY2tfZXZlbnQvZGVidWdfYW5ub3RhdGlvbi5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIqwHCg9EZWJ1Z0Fubm90YXRpb24SEgoIbmFtZV9paWQYASABKARIABIOCgRuYW1lGAogASgJSAASFAoKYm9vbF92YWx1ZRgCIAEoCEgBEhQKCnVpbnRfdmFsdWUYAyABKARIARITCglpbnRfdmFsdWUYBCABKANIARIWCgxkb3VibGVfdmFsdWUYBSABKAFIARIXCg1wb2ludGVyX3ZhbHVlGAcgASgESAESRAoMbmVzdGVkX3ZhbHVlGAggASgLMiwucGVyZmV0dG8ucHJvdG9zLkRlYnVnQW5ub3RhdGlvbi5OZXN0ZWRWYWx1ZUgBEhsKEWxlZ2FjeV9qc29uX3ZhbHVlGAkgASgJSAESFgoMc3RyaW5nX3ZhbHVlGAYgASgJSAES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Perfetto SDK should prefer to use the
* perfetto::TracedValue API to fill these protos, rather than filling them
* manually.
*
* Debug annotations are intended for debug use and are not considered a stable
* API of the trace contents. Trace-based metrics that use debug annotation
* values are prone to breakage, so please rely on typed TrackEvent fields for
* these instead.
*
* DebugAnnotations support nested arrays and dictionaries. Each entry is
* encoded as a single DebugAnnotation message. Only dictionary entries
* set the "name" field. The TrackEvent message forms an implicit root
* dictionary.
*
* Example TrackEvent with nested annotations:
* track_event {
* debug_annotations {
* name: "foo"
* dict_entries {
* name: "a"
* bool_value: true
* }
* dict_entries {
* name: "b"
* int_value: 123
* }
* }
* debug_annotations {
* name: "bar"
* array_values {
* string_value: "hello"
* }
* array_values {
* string_value: "world"
* }
* }
* }
*
* Next ID: 18.
* Reserved ID: 15
*
* @generated from message perfetto.protos.DebugAnnotation
*/
export type DebugAnnotation = Message<"perfetto.protos.DebugAnnotation"> & {
/**
* Name fields are set only for dictionary entries.
*
* @generated from oneof perfetto.protos.DebugAnnotation.name_field
*/
nameField: {
/**
* interned DebugAnnotationName.
*
* @generated from field: uint64 name_iid = 1;
*/
value: bigint;
case: "nameIid";
} | {
/**
* non-interned variant.
*
* @generated from field: string name = 10;
*/
value: string;
case: "name";
} | { case: undefined; value?: undefined };
/**
* @generated from oneof perfetto.protos.DebugAnnotation.value
*/
value: {
/**
* @generated from field: bool bool_value = 2;
*/
value: boolean;
case: "boolValue";
} | {
/**
* @generated from field: uint64 uint_value = 3;
*/
value: bigint;
case: "uintValue";
} | {
/**
* @generated from field: int64 int_value = 4;
*/
value: bigint;
case: "intValue";
} | {
/**
* @generated from field: double double_value = 5;
*/
value: number;
case: "doubleValue";
} | {
/**
* Pointers are stored in a separate type as the JSON output treats them
* differently from other uint64 values.
*
* @generated from field: uint64 pointer_value = 7;
*/
value: bigint;
case: "pointerValue";
} | {
/**
* Deprecated. Use dict_entries / array_values instead.
*
* @generated from field: perfetto.protos.DebugAnnotation.NestedValue nested_value = 8;
*/
value: DebugAnnotation_NestedValue;
case: "nestedValue";
} | {
/**
* Legacy instrumentation may not support conversion of nested data to
* NestedValue yet.
*
* @generated from field: string legacy_json_value = 9;
*/
value: string;
case: "legacyJsonValue";
} | {
/**
* interned and non-interned variants of strings.
*
* @generated from field: string string_value = 6;
*/
value: string;
case: "stringValue";
} | {
/**
* Corresponds to |debug_annotation_string_values| field in InternedData.
*
* @generated from field: uint64 string_value_iid = 17;
*/
value: bigint;
case: "stringValueIid";
} | { case: undefined; value?: undefined };
/**
* Used to embed arbitrary proto messages (which are also typically used to
* represent typed TrackEvent arguments). |proto_type_name| or
* |proto_type_name_iid| are storing the full name of the proto messages (e.g.
* .perfetto.protos.DebugAnnotation) and |proto_value| contains the serialised
* proto messages. See |TracedValue::WriteProto| for more details.
*
* @generated from oneof perfetto.protos.DebugAnnotation.proto_type_descriptor
*/
protoTypeDescriptor: {
/**
* @generated from field: string proto_type_name = 16;
*/
value: string;
case: "protoTypeName";
} | {
/**
* interned DebugAnnotationValueTypeName.
*
* @generated from field: uint64 proto_type_name_iid = 13;
*/
value: bigint;
case: "protoTypeNameIid";
} | { case: undefined; value?: undefined };
/**
* @generated from field: optional bytes proto_value = 14;
*/
protoValue: Uint8Array;
/**
* @generated from field: repeated perfetto.protos.DebugAnnotation dict_entries = 11;
*/
dictEntries: DebugAnnotation[];
/**
* @generated from field: repeated perfetto.protos.DebugAnnotation array_values = 12;
*/
arrayValues: DebugAnnotation[];
};
/**
* Describes the message perfetto.protos.DebugAnnotation.
* Use `create(DebugAnnotationSchema)` to create a new message.
*/
export const DebugAnnotationSchema: GenMessage<DebugAnnotation> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_track_event_debug_annotation, 0);
/**
* Deprecated legacy way to use nested values. Only kept for
* backwards-compatibility in TraceProcessor. May be removed in the future -
* code filling protos should use |dict_entries| and |array_values| instead.
*
* @generated from message perfetto.protos.DebugAnnotation.NestedValue
*/
export type DebugAnnotation_NestedValue = Message<"perfetto.protos.DebugAnnotation.NestedValue"> & {
/**
* @generated from field: optional perfetto.protos.DebugAnnotation.NestedValue.NestedType nested_type = 1;
*/
nestedType: DebugAnnotation_NestedValue_NestedType;
/**
* @generated from field: repeated string dict_keys = 2;
*/
dictKeys: string[];
/**
* @generated from field: repeated perfetto.protos.DebugAnnotation.NestedValue dict_values = 3;
*/
dictValues: DebugAnnotation_NestedValue[];
/**
* @generated from field: repeated perfetto.protos.DebugAnnotation.NestedValue array_values = 4;
*/
arrayValues: DebugAnnotation_NestedValue[];
/**
* @generated from field: optional int64 int_value = 5;
*/
intValue: bigint;
/**
* @generated from field: optional double double_value = 6;
*/
doubleValue: number;
/**
* @generated from field: optional bool bool_value = 7;
*/
boolValue: boolean;
/**
* @generated from field: optional string string_value = 8;
*/
stringValue: string;
};
/**
* Describes the message perfetto.protos.DebugAnnotation.NestedValue.
* Use `create(DebugAnnotation_NestedValueSchema)` to create a new message.
*/
export const DebugAnnotation_NestedValueSchema: GenMessage<DebugAnnotation_NestedValue> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_track_event_debug_annotation, 0, 0);
/**
* @generated from enum perfetto.protos.DebugAnnotation.NestedValue.NestedType
*/
export enum DebugAnnotation_NestedValue_NestedType {
/**
* leaf value.
*
* @generated from enum value: UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: DICT = 1;
*/
DICT = 1,
/**
* @generated from enum value: ARRAY = 2;
*/
ARRAY = 2,
}
/**
* Describes the enum perfetto.protos.DebugAnnotation.NestedValue.NestedType.
*/
export const DebugAnnotation_NestedValue_NestedTypeSchema: GenEnum<DebugAnnotation_NestedValue_NestedType> = /*@__PURE__*/
enumDesc(file_protos_perfetto_trace_track_event_debug_annotation, 0, 0, 0);
/**
* @generated from message perfetto.protos.DebugAnnotationName
*/
export type DebugAnnotationName = Message<"perfetto.protos.DebugAnnotationName"> & {
/**
* @generated from field: optional uint64 iid = 1;
*/
iid: bigint;
/**
* @generated from field: optional string name = 2;
*/
name: string;
};
/**
* Describes the message perfetto.protos.DebugAnnotationName.
* Use `create(DebugAnnotationNameSchema)` to create a new message.
*/
export const DebugAnnotationNameSchema: GenMessage<DebugAnnotationName> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_track_event_debug_annotation, 1);
/**
* See the |proto_type_descriptor| comment.
*
* @generated from message perfetto.protos.DebugAnnotationValueTypeName
*/
export type DebugAnnotationValueTypeName = Message<"perfetto.protos.DebugAnnotationValueTypeName"> & {
/**
* @generated from field: optional uint64 iid = 1;
*/
iid: bigint;
/**
* @generated from field: optional string name = 2;
*/
name: string;
};
/**
* Describes the message perfetto.protos.DebugAnnotationValueTypeName.
* Use `create(DebugAnnotationValueTypeNameSchema)` to create a new message.
*/
export const DebugAnnotationValueTypeNameSchema: GenMessage<DebugAnnotationValueTypeName> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_track_event_debug_annotation, 2);