Skip to content

Refine benchmark tooling and add CI smoke run #61

Refine benchmark tooling and add CI smoke run

Refine benchmark tooling and add CI smoke run #61

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r kll_sketch/requirements-test.txt
- name: Run tests with coverage
run: python -m pytest --cov=kll_sketch --cov-report=term-missing --cov-report=xml kll_sketch/tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
bench:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install bench extras
run: |
python -m pip install --upgrade pip
python -m pip install -e './kll_sketch[bench]'
- name: Run smoke benchmark
run: |
python benchmarks/bench_kll.py \
--outdir bench_out \
--Ns 1e5 \
--capacities 200 \
--distributions normal \
--qs 0.25 0.5 0.75 \
--shards 4
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: bench-out
path: bench_out