deep.config.tracepoint_config
Maintain the current config of the tracepoints.
ConfigUpdateListener
Bases: ABC
Class to describe a config listener.
Source code in deep/config/tracepoint_config.py
config_change(ts, old_hash, current_hash, old_config, new_config)
abstractmethod
Process an update to the tracepoint config.
:param ts: the ts of the new config :param old_hash: the old config hash :param current_hash: the new config hash :param old_config: the old config :param new_config: the new config
Source code in deep/config/tracepoint_config.py
TracepointConfigService
This service deals with new responses from the LongPoll.
Source code in deep/config/tracepoint_config.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
current_config: List[Trigger]
property
The current tracepoint config.
:return: the config
current_hash: str
property
The current hash.
The hash is updated only when the config is changed. It is used by the server and client to reduce the number of updates.
:return: the current hash.
__init__()
Create new tracepoint config service.
Source code in deep/config/tracepoint_config.py
add_custom(path, line, args, watches, metrics)
Crate a new tracepoint from the input.
:param path: the source file name :param line: the source line number :param args: the tracepoint args :param watches: the tracepoint watches :param metrics: the tracepoint metrics :return: the new TracePointConfig
Source code in deep/config/tracepoint_config.py
add_listener(listener)
Add a new listener to the config.
:param listener: the listener to add
remove_custom(_id)
Remove a custom tracepoint config.
:param _id: the id of the config to remove
Source code in deep/config/tracepoint_config.py
set_task_handler(task_handler)
update_listeners(ts, old_hash, current_hash, old_config, new_config)
Update the registered listeners.
This is called to update any listeners that the config has changed
:param ts: the ts of the update :param old_hash: the old hash :param current_hash: the new hash value :param old_config: the old config :param new_config: the new config
Source code in deep/config/tracepoint_config.py
update_new_config(ts, new_hash, new_config)
Update to the new config.
This is called when there is a change in the config, this will trigger a call to all listeners
:param ts: the ts of the last poll, in ms :param new_hash: the new config hash :param new_config: the new config values
Source code in deep/config/tracepoint_config.py
update_no_change(ts)
Update no change detected.
This is called when the response says the config has not changed
:param ts: the ts of the last poll, in ms