File size: 592 Bytes
6fff8e3
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import asyncio, sys
from playwright.async_api import async_playwright
BASE = "http://localhost:5173/preview/production/1b822e06-b78d-4352-884d-1f8fddabf546/"
async def main():
    async with async_playwright() as p:
        b = await p.chromium.launch()
        pg = await b.new_page()
        for ts in sys.argv[2:]:
            await pg.goto(f"{BASE}?still={ts}&o={sys.argv[1]}&w=1920")
            await pg.wait_for_function("document.title==='ready'", timeout=300000)
            print(ts, round(await pg.evaluate("window.MS"), 1), "ms/frame")
        await b.close()
asyncio.run(main())