test_q3_desktop_performance.py
python
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4
docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit.
Human
4 days ago
| 1 | """Performance tests for Track Q / Q3 Tauri desktop packaging.""" |
| 2 | |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | import time |
| 6 | from pathlib import Path |
| 7 | |
| 8 | from tests.fixtures.desktop import make_desktop_launcher |
| 9 | from tests.support import KIT_ROOT |
| 10 | from tools.desktop.manifest import DesktopManifest, validate_desktop_manifest |
| 11 | |
| 12 | |
| 13 | def test_desktop_launcher_startup_within_budget(tmp_path: Path) -> None: |
| 14 | launcher = make_desktop_launcher(tmp_path) |
| 15 | try: |
| 16 | start = time.monotonic() |
| 17 | launcher.start() |
| 18 | elapsed = time.monotonic() - start |
| 19 | assert elapsed < 5.0 |
| 20 | finally: |
| 21 | launcher.stop() |
| 22 | |
| 23 | |
| 24 | def test_manifest_validation_is_bounded(tmp_path: Path) -> None: |
| 25 | manifest = DesktopManifest.from_kit_root(KIT_ROOT) |
| 26 | start = time.monotonic() |
| 27 | for _ in range(20): |
| 28 | validate_desktop_manifest(manifest) |
| 29 | elapsed = time.monotonic() - start |
| 30 | assert elapsed < 1.0 |
File History
1 commit
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4
docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit.
Human
4 days ago