Benchmarks #896
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmarks | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "23 18 * * *" | |
workflow_dispatch: | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
if: github.repository == 'SeldonIO/MLServer' # Do not run this on forks. | |
strategy: | |
matrix: | |
scenario: ["inference-rest.js", "inference-grpc.js"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: false | |
- name: Install Dependencies | |
run: | | |
make install-dev | |
- name: Install k6 | |
working-directory: ./benchmarking | |
run: | | |
curl https://github.com/grafana/k6/releases/download/v0.44.1/k6-v0.44.1-linux-amd64.tar.gz -L | tar xvz --strip-components 1 | |
- name: Start Test Server & Run Benchmark | |
working-directory: ./benchmarking | |
run: | | |
make start-testserver & | |
sleep 5 && # Wait for test server to come up | |
./k6 run ./scenarios/${{ matrix.scenario }} | |
env: | |
MLSERVER_HOST: localhost | |
MLSERVER_HTTP_PORT: 8080 | |
MLSERVER_GRPC_PORT: 8081 |