27 lines
662 B
Python
27 lines
662 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
"""Run the local performance dashboard server."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
|
|
import uvicorn
|
|
|
|
|
|
def main() -> None:
|
|
parser = argparse.ArgumentParser(description="Run the FastVideo performance dashboard")
|
|
parser.add_argument("--host", default="127.0.0.1")
|
|
parser.add_argument("--port", type=int, default=8000)
|
|
parser.add_argument("--reload", action="store_true")
|
|
args = parser.parse_args()
|
|
uvicorn.run(
|
|
"fastvideo.performance_dashboard.api:app",
|
|
host=args.host,
|
|
port=args.port,
|
|
reload=args.reload,
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|