main
py 22 lines 713 Bytes
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 import argparse
4
5 from vllm.benchmarks.latency import add_cli_args, main
6 from vllm.entrypoints.cli.benchmark.base import BenchmarkSubcommandBase
7 from vllm.utils.argparse_utils import FlexibleArgumentParser
8
9
10 class BenchmarkLatencySubcommand(BenchmarkSubcommandBase):
11 """The `latency` subcommand for `vllm bench`."""
12
13 name = "latency"
14 help = "Benchmark the latency of a single batch of requests."
15
16 @classmethod
17 def add_cli_args(cls, parser: FlexibleArgumentParser) -> None:
18 add_cli_args(parser)
19
20 @staticmethod
21 def cmd(args: argparse.Namespace) -> None:
22 main(args)