MCPcopy
hub / github.com/plotly/dash / _finalize_timing

Method _finalize_timing

dash/backends/_fastapi.py:177–187  ·  view source on GitHub ↗

Calculate final timing information and return headers to add.

(self, request: Request)

Source from the content-addressed store, hash-verified

175 self.after_request_func()
176
177 def _finalize_timing(self, request: Request) -> dict | None:
178 """Calculate final timing information and return headers to add."""
179 if not self.enable_timing or not hasattr(request.state, "timing_information"):
180 return None
181
182 timing_information = request.state.timing_information
183 dash_total = timing_information.get("__dash_server", None)
184 if dash_total is not None:
185 dash_total["dur"] = round((time.time() - dash_total["dur"]) * 1000)
186
187 return timing_information
188
189 async def _handle_error(
190 self, error: Exception, scope: Scope, receive: Receive, send: Send

Callers 1

__call__Method · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected