fastflowtransform.api.context¶
reset_for_node ¶
reset_for_node(node_name)
Reset the current context stats and set the node name. Equivalent to: _get_http_ctx().reset_for_node(node_name)
Source code in src/fastflowtransform/api/context.py
96 97 98 99 100 101 | |
record ¶
record(io_key, content_hash, cache_hit, byte_len, used_offline)
Record a single HTTP IO event into the current context.
Parameters¶
io_key : str Stable IO cache key or identifier. content_hash : str Hash of the content (used for diagnostics). cache_hit : bool Whether the response came from cache. byte_len : int Number of response bytes (>= 0). used_offline : bool Whether the response was served in offline mode.
Source code in src/fastflowtransform/api/context.py
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 | |
snapshot ¶
snapshot()
Return a snapshot dict of the current context. If the context is not yet initialized, return an empty/default snapshot instead of raising.
Source code in src/fastflowtransform/api/context.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |