main
py 22 lines 695 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.serve 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 BenchmarkServingSubcommand(BenchmarkSubcommandBase):
11 """The `serve` subcommand for `vllm bench`."""
12
13 name = "serve"
14 help = "Benchmark the online serving throughput."
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)