blob: 3d8503bec6aa0455468d8da3c1c116e02c46d251 [file]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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 doris;
option java_package = "org.apache.doris.proto";
option cc_generic_services = true;
// Similar to gensrc/thrift/RuntimeProfile.thrift, this is changed to protobuf implementation
// Counter unit types (equivalent to Metrics.TUnit)
enum PProfileUnit {
// A dimensionless numerical quantity
UNIT = 0;
// Rate of a dimensionless numerical quantity
UNIT_PER_SECOND = 1;
CPU_TICKS = 2;
BYTES = 3;
BYTES_PER_SECOND = 4;
TIME_NS = 5;
DOUBLE_VALUE = 6;
// No units at all, may not be a numerical quantity
// It is used as a label now, so do not treat it as
// a real counter.
NONE = 7;
TIME_MS = 8;
TIME_S = 9;
}
// A single performance counter
message PProfileCounter {
required string name = 1;
required PProfileUnit type = 2;
required int64 value = 3;
optional int64 level = 4;
optional string description = 5;
}
// A set of child counters (used in map<string, set<string>>)
message PProfileChildCounterSet {
repeated string child_counters = 1;
}
// A single runtime profile node
message PRuntimeProfileNode {
required string name = 1;
required int32 num_children = 2;
// Flattened counters for this node and all its children
repeated PProfileCounter counters = 3;
// Node metadata (e.g., node id)
required int64 metadata = 4;
// Whether the child is indented
required bool indent = 5;
// Key-value info strings describing additional metadata
map<string, string> info_strings = 6;
// Order to display info strings
repeated string info_strings_display_order = 7;
// Map from parent counter name to a set of child counter names
map<string, PProfileChildCounterSet> child_counters_map = 8;
// Timestamp for this node
required int64 timestamp = 9;
// Deprecated field
optional bool deprecated_is_sink = 10;
}
// A flattened runtime profile tree in in-order traversal
message PRuntimeProfileTree {
repeated PRuntimeProfileNode nodes = 1;
}