Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: all performance tests run succesfully, add group thresholds #750

Merged
9 commits merged into from
Oct 20, 2023
56 changes: 43 additions & 13 deletions .github/workflows/performance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ concurrency:

on:
pull_request:
paths:
- ".github/workflows/performance-tests.yml"
- "tests/performance-tests/**"
push:
branches:
- "main"
Expand Down Expand Up @@ -41,11 +38,10 @@ jobs:
username: ${{ secrets.ATALA_GITHUB_ACTOR }}
password: ${{ secrets.ATALA_GITHUB_TOKEN }}

- name: Install Compose
uses: ndeloof/install-compose-action@v0.0.1
- uses: KengoTODA/actions-setup-docker-compose@v1
name: Install `docker-compose`
with:
version: v2.12.2
legacy: true # will also install in PATH as `docker-compose`
version: '2.14.2'

- name: Build local version of PRISM Agent
env:
Expand All @@ -61,8 +57,13 @@ jobs:
- name: Start services for issuer
env:
PORT: 8080
DEFAULT_WALLET_ENABLED: "true"
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5432
uses: isbang/compose-action@v1.4.1
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
Expand All @@ -73,15 +74,37 @@ jobs:
- name: Start services for holder
env:
PORT: 8090
DEFAULT_WALLET_ENABLED: "true"
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5433
uses: isbang/compose-action@v1.4.1
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p holder"
up-flags: "--wait"
down-flags: "--volumes"

- name: Start services for verifier
env:
PORT: 8100
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5434
uses: isbang/compose-action@v1.4.1
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p verifier"
up-flags: "--wait"
down-flags: "--volumes"

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -90,23 +113,30 @@ jobs:
scope: 'input-output-hk'

- name: Install dependencies
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v4.2.0
with:
cmd: install
dir: ${{ env.BENCHMARKING_DIR }}

- name: Compile tests to JS
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v4.2.0
with:
cmd: webpack
dir: ${{ env.BENCHMARKING_DIR }}

- name: Connection Flow Smoke Test
- name: All Smoke Tests
env:
ISSUER_AGENT_API_KEY: default
HOLDER_AGENT_API_KEY: default
VERIFIER_AGENT_API_KEY: default
run: |
# Have to use manual download because GitHub action doesnt support localhost execution
curl https://github.com/grafana/k6/releases/download/v0.45.0/k6-v0.45.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
ls -la
./k6 run ${{ env.BENCHMARKING_DIR }}/dist/connection-flow-test.js
./k6 run -e SCENARIO_LABEL=create-prism-did-smoke ${{ env.BENCHMARKING_DIR }}/dist/create-prism-did-test.js
./k6 run -e SCENARIO_LABEL=credential-offer-smoke ${{ env.BENCHMARKING_DIR }}/dist/credential-offer-test.js
./k6 run -e SCENARIO_LABEL=credential-schema-smoke ${{ env.BENCHMARKING_DIR }}/dist/credential-schema-test.js
./k6 run -e SCENARIO_LABEL=did-publishing-smoke ${{ env.BENCHMARKING_DIR }}/dist/did-publishing-test.js
./k6 run -e SCENARIO_LABEL=connection-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/connection-flow-test.js
./k6 run -e SCENARIO_LABEL=issuance-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/issuance-flow-test.js
./k6 run -e SCENARIO_LABEL=present-proof-flow-smoke ${{ env.BENCHMARKING_DIR }}/dist/present-proof-flow-test.js
4 changes: 2 additions & 2 deletions infrastructure/shared/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ services:
AGENT_DB_NAME: agent
AGENT_DB_USER: postgres
AGENT_DB_PASSWORD: postgres
DIDCOMM_SERVICE_URL: ${DIDCOMM_SERVICE_URL:-http://${DOCKERHOST}:${PORT}/didcomm}
REST_SERVICE_URL: ${REST_SERVICE_URL:-http://${DOCKERHOST}:${PORT}/prism-agent}
DIDCOMM_SERVICE_URL: http://${DOCKERHOST}:${PORT}/didcomm
REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/prism-agent
PRISM_NODE_HOST: prism-node
PRISM_NODE_PORT: 50053
VAULT_ADDR: ${VAULT_ADDR:-http://vault-server:8200}
Expand Down
3 changes: 3 additions & 0 deletions infrastructure/single-tenant-testing-stack/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PRISM_AGENT_VERSION=1.17.0
PRISM_NODE_VERSION=2.2.1
VAULT_DEV_ROOT_TOKEN_ID=root
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
plugins:
- name: proxy-rewrite

routes:
- uri: /issuer/prism-agent/*
upstream_id: 1
plugins:
proxy-rewrite:
regex_uri: ["^/issuer/prism-agent/(.*)", "/$1"]
- uri: /issuer/didcomm*
upstream_id: 2
plugins:
proxy-rewrite:
regex_uri: ["^/issuer/didcomm(.*)", "/$1"]
- uri: /verifier/prism-agent/*
upstream_id: 3
plugins:
proxy-rewrite:
regex_uri: ["^/verifier/prism-agent/(.*)", "/$1"]
- uri: /verifier/didcomm*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/verifier/didcomm(.*)", "/$1"]
- uri: /holder/prism-agent/*
upstream_id: 5
plugins:
proxy-rewrite:
regex_uri: ["^/holder/prism-agent/(.*)", "/$1"]
- uri: /holder/didcomm*
upstream_id: 6
plugins:
proxy-rewrite:
regex_uri: ["^/holder/didcomm(.*)", "/$1"]
upstreams:
- id: 1
nodes:
"issuer-oea:8085": 1 # tapir
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
- id: 2
nodes:
"issuer-oea:8090": 1 # didcom
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
- id: 3
nodes:
"verifier-oea:8085": 1 # tapir
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
- id: 4
nodes:
"verifier-oea:8090": 1 # didcom
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
- id: 5
nodes:
"holder-oea:8085": 1 # tapir
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
- id: 6
nodes:
"holder-oea:8090": 1 # didcom
type: roundrobin
timeout:
connect: 900
send: 900
read: 900
#END
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false
enable_admin: false
config_center: yaml

deployment:
role: data_plane
role_data_plane:
config_provider: yaml
Loading
Loading