deep.processor.frame_collector
Processing for frame collection.
FrameCollector
This deals with collecting data from the paused frames.
Source code in deep/processor/frame_collector.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|
__init__(source, frame)
Create a new collector.
:param source: the collector context :param frame: the frame data
Source code in deep/processor/frame_collector.py
collect(var_lookup, var_cache)
Collect the data from the current frame.
:param var_lookup: the var lookup to use :param var_cache: the var cache to use :return:
Source code in deep/processor/frame_collector.py
parse_short_name(filename)
Process a file name into a shorter version.
By default, the file names in python are the absolute path to the file on disk. These can be quite long, so we try to shorten the names by looking at the APP_ROOT and converting the file name into a relative path.
e.g. if the file name is '/dev/python/custom_service/api/handler.py' and the APP_ROOT is '/dev/python/custom_service' then we shorten the path to 'custom_service/api/handler.py'.
:param (str) filename: the file name :returns: (str) filename: the new file name (bool) is_app_frame: True if the file is an application frame file
Source code in deep/processor/frame_collector.py
FrameCollectorContext
Bases: ABC
The context that is used to wrap a collection event.
Source code in deep/processor/frame_collector.py
collection_config: VariableProcessorConfig
abstractmethod
property
The variable processing config.
max_tp_process_time: int
abstractmethod
property
The max time to spend processing a tracepoint.
ts: int
abstractmethod
property
The timestamp in nanoseconds for this trigger.
is_app_frame(filename)
abstractmethod
Check if the current frame is a user application frame.
:param filename: the frame file name :return: True if add frame, else False
should_collect_vars(current_frame_index)
abstractmethod
Check if we can collect data for a frame.
Frame indexes start from 0 (as the current frame) and increase as we go back up the stack.
:param (int) current_frame_index: the current frame index. :return (bool): if we should collect the frame vars.