perfetto-protos
Version:
Perfetto protos exposed via protobuf-es for browser and node
289 lines (252 loc) • 12.2 kB
text/typescript
//
// Copyright (C) 2020 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/memory_graph.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/memory_graph.proto.
*/
export const file_protos_perfetto_trace_memory_graph: GenFile = /*@__PURE__*/
fileDesc("Cihwcm90b3MvcGVyZmV0dG8vdHJhY2UvbWVtb3J5X2dyYXBoLnByb3RvEg9wZXJmZXR0by5wcm90b3Mi8AcKFU1lbW9yeVRyYWNrZXJTbmFwc2hvdBIWCg5nbG9iYWxfZHVtcF9pZBgBIAEoBBJNCg9sZXZlbF9vZl9kZXRhaWwYAiABKA4yNC5wZXJmZXR0by5wcm90b3MuTWVtb3J5VHJhY2tlclNuYXBzaG90LkxldmVsT2ZEZXRhaWwSVAoUcHJvY2Vzc19tZW1vcnlfZHVtcHMYAyADKAsyNi5wZXJmZXR0by5wcm90b3MuTWVtb3J5VHJhY2tlclNuYXBzaG90LlByb2Nlc3NTbmFwc2hvdBrOBQoPUHJvY2Vzc1NuYXBzaG90EgsKA3BpZBgBIAEoBRJaCg9hbGxvY2F0b3JfZHVtcHMYAiADKAsyQS5wZXJmZXR0by5wcm90b3MuTWVtb3J5VHJhY2tlclNuYXBzaG90LlByb2Nlc3NTbmFwc2hvdC5NZW1vcnlOb2RlElcKDG1lbW9yeV9lZGdlcxgDIAMoCzJBLnBlcmZldHRvLnByb3Rvcy5NZW1vcnlUcmFja2VyU25hcHNob3QuUHJvY2Vzc1NuYXBzaG90Lk1lbW9yeUVkZ2UamwMKCk1lbW9yeU5vZGUSCgoCaWQYASABKAQSFQoNYWJzb2x1dGVfbmFtZRgCIAEoCRIMCgR3ZWFrGAMgASgIEhIKCnNpemVfYnl0ZXMYBCABKAQSYgoHZW50cmllcxgFIAMoCzJRLnBlcmZldHRvLnByb3Rvcy5NZW1vcnlUcmFja2VyU25hcHNob3QuUHJvY2Vzc1NuYXBzaG90Lk1lbW9yeU5vZGUuTWVtb3J5Tm9kZUVudHJ5GuMBCg9NZW1vcnlOb2RlRW50cnkSDAoEbmFtZRgBIAEoCRJmCgV1bml0cxgCIAEoDjJXLnBlcmZldHRvLnByb3Rvcy5NZW1vcnlUcmFja2VyU25hcHNob3QuUHJvY2Vzc1NuYXBzaG90Lk1lbW9yeU5vZGUuTWVtb3J5Tm9kZUVudHJ5LlVuaXRzEhQKDHZhbHVlX3VpbnQ2NBgDIAEoBBIUCgx2YWx1ZV9zdHJpbmcYBCABKAkiLgoFVW5pdHMSDwoLVU5TUEVDSUZJRUQQABIJCgVCWVRFUxABEgkKBUNPVU5UEAIaWwoKTWVtb3J5RWRnZRIRCglzb3VyY2VfaWQYASABKAQSEQoJdGFyZ2V0X2lkGAIgASgEEhIKCmltcG9ydGFuY2UYAyABKA0SEwoLb3ZlcnJpZGFibGUYBCABKAgiSQoNTGV2ZWxPZkRldGFpbBIPCgtERVRBSUxfRlVMTBAAEhAKDERFVEFJTF9MSUdIVBABEhUKEURFVEFJTF9CQUNLR1JPVU5EEAI");
/**
* @generated from message perfetto.protos.MemoryTrackerSnapshot
*/
export type MemoryTrackerSnapshot = Message<"perfetto.protos.MemoryTrackerSnapshot"> & {
/**
* Unique ID that represents the global memory dump.
*
* @generated from field: optional uint64 global_dump_id = 1;
*/
globalDumpId: bigint;
/**
* @generated from field: optional perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail level_of_detail = 2;
*/
levelOfDetail: MemoryTrackerSnapshot_LevelOfDetail;
/**
* @generated from field: repeated perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot process_memory_dumps = 3;
*/
processMemoryDumps: MemoryTrackerSnapshot_ProcessSnapshot[];
};
/**
* Describes the message perfetto.protos.MemoryTrackerSnapshot.
* Use `create(MemoryTrackerSnapshotSchema)` to create a new message.
*/
export const MemoryTrackerSnapshotSchema: GenMessage<MemoryTrackerSnapshot> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_memory_graph, 0);
/**
* Memory snapshot of a process. The snapshot contains memory data that is
* from 2 different sources, namely system stats and instrumentation stats.
* The system memory usage stats come from the OS based on standard API
* available in the platform to query memory usage. The instrumentation stats
* are added by instrumenting specific piece of code which tracks memory
* allocations and deallocations made by a small sub-system within the
* application.
* The system stats of the global memory snapshot are recorded as part of
* ProcessStats and SmapsPacket fields in trace packet with the same
* timestamp.
*
* @generated from message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
*/
export type MemoryTrackerSnapshot_ProcessSnapshot = Message<"perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot"> & {
/**
* Process ID of the process
*
* @generated from field: optional int32 pid = 1;
*/
pid: number;
/**
* @generated from field: repeated perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode allocator_dumps = 2;
*/
allocatorDumps: MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode[];
/**
* @generated from field: repeated perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge memory_edges = 3;
*/
memoryEdges: MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge[];
};
/**
* Describes the message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.
* Use `create(MemoryTrackerSnapshot_ProcessSnapshotSchema)` to create a new message.
*/
export const MemoryTrackerSnapshot_ProcessSnapshotSchema: GenMessage<MemoryTrackerSnapshot_ProcessSnapshot> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_memory_graph, 0, 0);
/**
* A single node in the memory graph.
*
* @generated from message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
*/
export type MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode = Message<"perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode"> & {
/**
* Unique ID of the node across all processes involved in the global
* memory dump. The ID is only unique within this particular global dump
* identified by GlobalMemoryDumpPacket.global_dump_id.
*
* @generated from field: optional uint64 id = 1;
*/
id: bigint;
/**
* Absolute name is a unique name for the memory node within the process
* with ProcessMemoryDump.pid. The name can contain multiple parts
* separated by '/', which traces the edges of the node from the root
* node.
* Eg: "partition_allocator/array_buffers/buffer1" refers to the child
* node "buffer1" in a graph structure of:
* root -> partition_allocator -> array_buffers -> buffer1.
*
* @generated from field: optional string absolute_name = 2;
*/
absoluteName: string;
/**
* A weak node means that the instrumentation that added the current node
* is unsure about the existence of the actual memory. Unless a "strong"
* (non-weak is default) node that has an edge to the current node exists
* in the current global dump, the current node will be discarded.
*
* @generated from field: optional bool weak = 3;
*/
weak: boolean;
/**
* Size of the node in bytes, used to compute the effective size of the
* nodes without double counting.
*
* @generated from field: optional uint64 size_bytes = 4;
*/
sizeBytes: bigint;
/**
* @generated from field: repeated perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry entries = 5;
*/
entries: MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry[];
};
/**
* Describes the message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.
* Use `create(MemoryTrackerSnapshot_ProcessSnapshot_MemoryNodeSchema)` to create a new message.
*/
export const MemoryTrackerSnapshot_ProcessSnapshot_MemoryNodeSchema: GenMessage<MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_memory_graph, 0, 0, 0);
/**
* Entries in the memory node that contain statistics and additional
* debuggable information about the memory. The size of the node is
* tracked separately in the |size_bytes| field.
*
* @generated from message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
*/
export type MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry = Message<"perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry"> & {
/**
* @generated from field: optional string name = 1;
*/
name: string;
/**
* @generated from field: optional perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units units = 2;
*/
units: MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units;
/**
* Contains either one of uint64 or string value.
*
* @generated from field: optional uint64 value_uint64 = 3;
*/
valueUint64: bigint;
/**
* @generated from field: optional string value_string = 4;
*/
valueString: string;
};
/**
* Describes the message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.
* Use `create(MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntrySchema)` to create a new message.
*/
export const MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntrySchema: GenMessage<MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_memory_graph, 0, 0, 0, 0);
/**
* @generated from enum perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units
*/
export enum MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units {
/**
* @generated from enum value: UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: BYTES = 1;
*/
BYTES = 1,
/**
* @generated from enum value: COUNT = 2;
*/
COUNT = 2,
}
/**
* Describes the enum perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units.
*/
export const MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_UnitsSchema: GenEnum<MemoryTrackerSnapshot_ProcessSnapshot_MemoryNode_MemoryNodeEntry_Units> = /*@__PURE__*/
enumDesc(file_protos_perfetto_trace_memory_graph, 0, 0, 0, 0, 0);
/**
* A directed edge that connects any 2 nodes in the graph above. These are
* in addition to the inherent edges added due to the tree structure of the
* node's absolute names.
* Node with id |source_id| owns the node with id |target_id|, and has the
* effect of attributing the memory usage of target to source. |importance|
* is optional and relevant only for the cases of co-ownership, where it
* acts as a z-index: the owner with the highest importance will be
* attributed target's memory.
*
* @generated from message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
*/
export type MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge = Message<"perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge"> & {
/**
* @generated from field: optional uint64 source_id = 1;
*/
sourceId: bigint;
/**
* @generated from field: optional uint64 target_id = 2;
*/
targetId: bigint;
/**
* @generated from field: optional uint32 importance = 3;
*/
importance: number;
/**
* @generated from field: optional bool overridable = 4;
*/
overridable: boolean;
};
/**
* Describes the message perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.
* Use `create(MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdgeSchema)` to create a new message.
*/
export const MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdgeSchema: GenMessage<MemoryTrackerSnapshot_ProcessSnapshot_MemoryEdge> = /*@__PURE__*/
messageDesc(file_protos_perfetto_trace_memory_graph, 0, 0, 1);
/**
* @generated from enum perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail
*/
export enum MemoryTrackerSnapshot_LevelOfDetail {
/**
* @generated from enum value: DETAIL_FULL = 0;
*/
DETAIL_FULL = 0,
/**
* @generated from enum value: DETAIL_LIGHT = 1;
*/
DETAIL_LIGHT = 1,
/**
* @generated from enum value: DETAIL_BACKGROUND = 2;
*/
DETAIL_BACKGROUND = 2,
}
/**
* Describes the enum perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail.
*/
export const MemoryTrackerSnapshot_LevelOfDetailSchema: GenEnum<MemoryTrackerSnapshot_LevelOfDetail> = /*@__PURE__*/
enumDesc(file_protos_perfetto_trace_memory_graph, 0, 0);