Skip to content

Bench

Bench #99

Workflow file for this run

name: Bench
on:
workflow_dispatch:
jobs:
bench-ponder:
name: Bench:Ponder
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_INITDB_ARGS: -E UTF8 --locale=C
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
ports:
- 5432:5432
anvil:
image: ghcr.io/0xolias/simple-anvil-image:main
env:
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }}
ANVIL_FORK_BLOCK_NUMBER: 17501000
ports:
- 8545:8545
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Bench
run: pnpm bench:ponder:ci
env:
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }}
bench-subgraph:
name: Bench:Subgraph
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_INITDB_ARGS: -E UTF8 --locale=C
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
ports:
- 5432:5432
anvil:
image: ghcr.io/0xolias/simple-anvil-image:main
env:
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }}
ANVIL_FORK_BLOCK_NUMBER: 17500000
ports:
- 8545:8545
ipfs:
image: ipfs/go-ipfs:v0.10.0
ports:
- 5001:5001
graph-node:
image: graphprotocol/graph-node:latest
# Would be best to get this health check working, but so far it hasn't been an issue.
# options: >-
# --health-cmd "curl --fail http://graph-node:8040"
env:
postgres_host: postgres
postgres_user: postgres
postgres_pass: postgres
postgres_db: postgres
ipfs: ipfs:5001
ethereum: mainnet:http://anvil:8545
ETHEREUM_REORG_THRESHOLD: 0
GRAPH_LOG: debug
ports:
- 8000:8000
- 8001:8001
- 8020:8020
- 8030:8030
- 8040:8040
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Codegen
run: cd benchmarks && pnpm graph codegen subgraph/subgraph.yaml
- name: Bench
run: pnpm bench:subgraph:ci
env:
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }}
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres