"""Performance and background-jobs namespace: ``b.perf.*``.""" from __future__ import annotations from browser_cli.sdk.base import Namespace class PerfNS(Namespace): """Inspect the performance profile and manage background jobs.""" def status(self) -> dict: return self._c._cmd("perf.status", {}) or {} def set_profile(self, profile: str) -> dict: return self._c._cmd("perf.set_profile", {"profile": profile}) or {} def job_status(self, job_id: str) -> dict: return self._c._cmd("jobs.status", {"jobId": job_id}) or {} def job_cancel(self, job_id: str) -> dict: return self._c._cmd("jobs.cancel", {"jobId": job_id}) or {}