import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { ChromeProcessDescriptor } from "./chrome_process_descriptor_pb";
import type { ChromeThreadDescriptor } from "./chrome_thread_descriptor_pb";
import type { ProcessDescriptor } from "./process_descriptor_pb";
import type { ThreadDescriptor } from "./thread_descriptor_pb";
import type { CounterDescriptor } from "./counter_descriptor_pb";
import type { Message } from "@bufbuild/protobuf";
/**
 * Describes the file protos/perfetto/trace/track_event/track_descriptor.proto.
 */
export declare const file_protos_perfetto_trace_track_event_track_descriptor: GenFile;
/**
 * Defines a track for TrackEvents. Slices and instant events on the same track
 * will be nested based on their timestamps, see TrackEvent::Type.
 *
 * A TrackDescriptor only needs to be emitted by one trace writer / producer and
 * is valid for the entirety of the trace. To ensure the descriptor isn't lost
 * when the ring buffer wraps, it should be reemitted whenever incremental state
 * is cleared.
 *
 * As a fallback, TrackEvents emitted without an explicit track association will
 * be associated with an implicit trace-global track (uuid = 0), see also
 * |TrackEvent::track_uuid|. It is possible but not necessary to emit a
 * TrackDescriptor for this implicit track.
 *
 * Next id: 14.
 *
 * @generated from message perfetto.protos.TrackDescriptor
 */
export type TrackDescriptor = Message<"perfetto.protos.TrackDescriptor"> & {
    /**
     * Unique ID that identifies this track. This ID is global to the whole trace.
     * Producers should ensure that it is unlikely to clash with IDs emitted by
     * other producers. A value of 0 denotes the implicit trace-global track.
     *
     * For example, legacy TRACE_EVENT macros may use a hash involving the async
     * event id + id_scope, pid, and/or tid to compute this ID.
     *
     * @generated from field: optional uint64 uuid = 1;
     */
    uuid: bigint;
    /**
     * A parent track reference can be used to describe relationships between
     * tracks. For example, to define an asynchronous track which is scoped to a
     * specific process, specify the uuid for that process's process track here.
     * Similarly, to associate a COUNTER_THREAD_TIME_NS counter track with a
     * thread, specify the uuid for that thread's thread track here.
     *
     * @generated from field: optional uint64 parent_uuid = 5;
     */
    parentUuid: bigint;
    /**
     * Name of the track. Optional - if unspecified, it may be derived from the
     * process/thread name (process/thread tracks), the first event's name (async
     * tracks), or counter name (counter tracks).
     *
     * @generated from oneof perfetto.protos.TrackDescriptor.static_or_dynamic_name
     */
    staticOrDynamicName: {
        /**
         * @generated from field: string name = 2;
         */
        value: string;
        case: "name";
    } | {
        /**
         * This field is only set by the SDK when perfetto::StaticString is
         * provided.
         *
         * @generated from field: string static_name = 10;
         */
        value: string;
        case: "staticName";
    } | {
        /**
         * Equivalent to name, used just to mark that the data is coming from
         * android.os.Trace.
         *
         * @generated from field: string atrace_name = 13;
         */
        value: string;
        case: "atraceName";
    } | {
        case: undefined;
        value?: undefined;
    };
    /**
     * Associate the track with a process, making it the process-global track.
     * There should only be one such track per process (usually for instant
     * events; trace processor uses this fact to detect pid reuse). If you need
     * more (e.g. for asynchronous events), create child tracks using parent_uuid.
     *
     * Trace processor will merge events on a process track with slice-type events
     * from other sources (e.g. ftrace) for the same process into a single
     * timeline view.
     *
     * @generated from field: optional perfetto.protos.ProcessDescriptor process = 3;
     */
    process?: ProcessDescriptor;
    /**
     * @generated from field: optional perfetto.protos.ChromeProcessDescriptor chrome_process = 6;
     */
    chromeProcess?: ChromeProcessDescriptor;
    /**
     * Associate the track with a thread, indicating that the track's events
     * describe synchronous code execution on the thread. There should only be one
     * such track per thread (trace processor uses this fact to detect tid reuse).
     *
     * Trace processor will merge events on a thread track with slice-type events
     * from other sources (e.g. ftrace) for the same thread into a single timeline
     * view.
     *
     * @generated from field: optional perfetto.protos.ThreadDescriptor thread = 4;
     */
    thread?: ThreadDescriptor;
    /**
     * @generated from field: optional perfetto.protos.ChromeThreadDescriptor chrome_thread = 7;
     */
    chromeThread?: ChromeThreadDescriptor;
    /**
     * Descriptor for a counter track. If set, the track will only support
     * TYPE_COUNTER TrackEvents (and values provided via TrackEvent's
     * |extra_counter_values|).
     *
     * @generated from field: optional perfetto.protos.CounterDescriptor counter = 8;
     */
    counter?: CounterDescriptor;
    /**
     * If true, forces Trace Processor to use separate tracks for track events
     * and system events for the same thread.
     * Track events timestamps in Chrome have microsecond resolution, while
     * system events use nanoseconds. It results in broken event nesting when
     * track events and system events share a track.
     *
     * @generated from field: optional bool disallow_merging_with_system_tracks = 9;
     */
    disallowMergingWithSystemTracks: boolean;
    /**
     * @generated from field: optional perfetto.protos.TrackDescriptor.ChildTracksOrdering child_ordering = 11;
     */
    childOrdering: TrackDescriptor_ChildTracksOrdering;
    /**
     * An opaque value which allows specifying how two sibling tracks should be
     * ordered relative to each other: tracks with lower ranks will appear before
     * tracks with higher ranks. An unspecified rank will be treated as a rank of
     * 0.
     *
     * @generated from field: optional int32 sibling_order_rank = 12;
     */
    siblingOrderRank: number;
};
/**
 * Describes the message perfetto.protos.TrackDescriptor.
 * Use `create(TrackDescriptorSchema)` to create a new message.
 */
export declare const TrackDescriptorSchema: GenMessage<TrackDescriptor>;
/**
 * Specifies how the UI should display child tracks of this track (i.e. tracks
 * where `parent_uuid` is specified to this track `uuid`). Note that this
 * value is simply a *hint* to the UI: the UI is not guarnateed to respect
 * this if it has a good reason not to do so.
 *
 * @generated from enum perfetto.protos.TrackDescriptor.ChildTracksOrdering
 */
export declare enum TrackDescriptor_ChildTracksOrdering {
    /**
     * The default ordering, with no bearing on how the UI will visualise the
     * tracks.
     *
     * @generated from enum value: UNKNOWN = 0;
     */
    UNKNOWN = 0,
    /**
     * Order tracks by `name` or `static_name` depending on which one has been
     * specified.
     *
     * @generated from enum value: LEXICOGRAPHIC = 1;
     */
    LEXICOGRAPHIC = 1,
    /**
     * Order tracks by the first `ts` event in a track.
     *
     * @generated from enum value: CHRONOLOGICAL = 2;
     */
    CHRONOLOGICAL = 2,
    /**
     * Order tracks by `sibling_order_rank` of child tracks. Child tracks with
     * the lower values will be shown before tracks with higher values. Tracks
     * with no value will be treated as having 0 rank.
     *
     * @generated from enum value: EXPLICIT = 3;
     */
    EXPLICIT = 3
}
/**
 * Describes the enum perfetto.protos.TrackDescriptor.ChildTracksOrdering.
 */
export declare const TrackDescriptor_ChildTracksOrderingSchema: GenEnum<TrackDescriptor_ChildTracksOrdering>;
//# sourceMappingURL=track_descriptor_pb.d.ts.map