mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-27 06:13:07 +00:00
test(perf): tag a UI journey sample with its API response, not a Next.js prefetch under /ui/ (#47650)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
70ece3501f
commit
95b6eea5bb
1 changed files with 4 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ from dataclasses import dataclass
|
|||
from datetime import datetime
|
||||
from itertools import chain
|
||||
from types import MappingProxyType
|
||||
from urllib.parse import urlsplit
|
||||
from typing import Final
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
from playwright.sync_api import Error as PlaywrightError
|
||||
from playwright.sync_api import Locator, Page, Response, expect, sync_playwright
|
||||
|
|
@ -189,7 +189,9 @@ def _login(page: Page, dashboard: Dashboard) -> None:
|
|||
|
||||
|
||||
def _is_data_fetch(response: Response) -> bool:
|
||||
return response.request.resource_type in ("fetch", "xhr") and "/_next/" not in response.url
|
||||
"""API calls only. The Admin UI's own assets and Next.js prefetches live under /ui/ and /_next/."""
|
||||
path: Final = urlsplit(response.url).path
|
||||
return response.request.resource_type in ("fetch", "xhr") and not path.startswith(("/ui/", "/_next/"))
|
||||
|
||||
|
||||
def _worst(responses: list[Response]) -> Response | None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue