-
Notifications
You must be signed in to change notification settings - Fork 186
42 lines (40 loc) · 1.27 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
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