Skip to content

Commit 1a567db

Browse files
mresoagunapal
andauthored
Refactor benchmark script for LLM benchmark integration (#2897)
* Added unit test for benchmark-ab.py; refactor test plans into module * Declutter benchmark script * Move benchmark reporting into module; remove global variable * refactored system under test in benchmark script * Move benchmark script refactoring * Remove unnecessary method * Refactor benchmark into benchmark class * Resort methods * Move print * split benchmark and systems under test into separate files * Split benchmark and ts reporting * Remove global metrics variable * Refactor reporting * Skip benchmark test if click is missing * Fix mising import after precommit * Added locust as a benchmark backend * Fix spell check test --------- Co-authored-by: Ankith Gunapal <[email protected]>
1 parent 4b69459 commit 1a567db

12 files changed

+888
-657
lines changed

benchmarks/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
The benchmarks measure the performance of TorchServe on various models and benchmarks. It supports either a number of built-in models or a custom model passed in as a path or URL to the .mar file. It also runs various benchmarks using these models (see benchmarks section below). The benchmarks are executed in the user machine through a python3 script in case of jmeter and a shell script in case of apache benchmark. TorchServe is run on the same machine in a docker instance to avoid network latencies. The benchmark must be run from within `serve/benchmarks`
44

5-
We currently support benchmarking with JMeter & Apache Bench. One can also profile backend code with snakeviz.
5+
We currently support benchmarking with JMeter, Apache Bench and Locust. One can also profile backend code with snakeviz.
66

77
* [Benchmarking with Apache Bench](#benchmarking-with-apache-bench)
88
* [Auto Benchmarking with Apache Bench](#auto-benchmarking-with-apache-bench)
99
* [Benchmarking and Profiling with JMeter](jmeter.md)
1010

11-
# Benchmarking with Apache Bench
11+
⚠️**Please Note**⚠️ In future we will deprecate Apache Bench in favor of locust.
12+
13+
# Benchmarking with Locust/Apache Bench
1214

1315
## Installation
1416

@@ -43,6 +45,8 @@ Refer [parameters section](#benchmark-parameters) for more details on configurab
4345

4446
`python benchmark-ab.py`
4547

48+
To switch between Apache Bench and Locust you can set the --benchmark-backend/-bb parameter to either "ab" or "locust".
49+
4650
### Run benchmark using a config file
4751
The config parameters can be provided using cmd line args and a config json file as well.
4852
This command will use all the configuration parameters given in config.json file.

0 commit comments

Comments
 (0)