deep.api.tracepoint.tracepoint_config
Internal type for configured tracepoints.
LabelExpression
A metric label expression.
Source code in deep/api/tracepoint/tracepoint_config.py
expression
property
The label expression.
key
property
The label key.
static
property
The label static value.
__eq__(other)
Check if other object is equals to this one.
Source code in deep/api/tracepoint/tracepoint_config.py
__init__(key, static=None, expression=None)
Create a new label expression.
:param key: the label key :param static: the label static value :param expression: the label expression
Source code in deep/api/tracepoint/tracepoint_config.py
__repr__()
MetricDefinition
The definition of a metric to collect.
Source code in deep/api/tracepoint/tracepoint_config.py
__eq__(other)
Check if other object is equals to this one.
Source code in deep/api/tracepoint/tracepoint_config.py
__init__(name, metric_type, labels=None, expression=None, namespace=None, help_str=None, unit=None)
Create a new metric definition.
:param name: the metric name :param labels: the metric labels :param metric_type: the metrics type :param expression: the metrics expression :param namespace: the metric namespace :param help_str: the metric help into :param unit: the metric unit
Source code in deep/api/tracepoint/tracepoint_config.py
__repr__()
TracePointConfig
This represents the configuration of a single tracepoint.
This is a python version of the GRPC data collected from the LongPoll.
Source code in deep/api/tracepoint/tracepoint_config.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
args
property
The tracepoint args.
condition
property
The tracepoint condition.
fire_count
property
Get the allowed number of triggers.
:return: the configured number of triggers, or -1 for unlimited triggers
frame_type
property
The tracepoint frame type.
id
property
The tracepoint id.
line_no
property
The tracepoint line number.
path
property
The tracepoint source file.
stack_type
property
The tracepoint stack type.
watches
property
The tracepoint watches.
__init__(tp_id, path, line_no, args, watches, metrics)
Create a new tracepoint config.
:param tp_id: the tracepoint id :param path: the tracepoint source file :param line_no: the tracepoint line number :param args: the tracepoint args :param watches: the tracepoint watches
Source code in deep/api/tracepoint/tracepoint_config.py
__repr__()
__str__()
get_arg(name, default_value)
Get an arg from tracepoint args.
:param name: the argument name :param default_value: the default value :return: the value, or the default value
Source code in deep/api/tracepoint/tracepoint_config.py
get_arg_int(name, default_value)
Get an argument from the args as an int.
:param name: the argument name :param default_value: the default value to use. :return: the value as an int, or the default value
Source code in deep/api/tracepoint/tracepoint_config.py
TracepointExecutionStats
This keeps track of the tracepoint stats, so we can check fire counts etc.
Source code in deep/api/tracepoint/tracepoint_config.py
fire_count
property
The number of times this tracepoint has fired.
:return: the number of times this has fired.
last_fire
property
The time this tracepoint last fired.
:return: the time in nanoseconds.
__init__()
fire(ts)
Record a fire.
Call this to record this tracepoint being triggered.
:param ts: the time in nanoseconds
TracepointWindow
This is used to handle validating the time frame for the tracepoint.
Source code in deep/api/tracepoint/tracepoint_config.py
__init__(start, end)
Create a new tracepoint window.
:param start: the window start time :param end: the window end time
in_window(ts)
Is the provided time in the configured window.
:param ts: time in ms :return: true, if the time is within the configured window, else false
Source code in deep/api/tracepoint/tracepoint_config.py
frame_type_ordinal(frame_type)
Convert a frame type to an ordinal (essentially making it an enum).
This is useful for ordering.
:param frame_type: the frame type :return: the ordinal of the type