mirror of
https://github.com/zizmorcore/zizmor.git
synced 2025-12-23 08:47:33 +00:00
chore: online benchmarks (#1441)
This commit is contained in:
parent
c9fc966d0a
commit
411b74a5a9
2 changed files with 70 additions and 0 deletions
2
.github/workflows/benchmark.yml
vendored
2
.github/workflows/benchmark.yml
vendored
|
|
@ -33,6 +33,8 @@ jobs:
|
|||
|
||||
- name: Run the benchmarks
|
||||
uses: CodSpeedHQ/action@346a2d8a8d9d38909abd0bc3d23f773110f076ad # v4.4.1
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
mode: simulation
|
||||
run: make bench
|
||||
|
|
|
|||
68
bench/test_bench_online.py
Normal file
68
bench/test_bench_online.py
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from bench.common import zizmor
|
||||
|
||||
|
||||
@pytest.mark.skipif("GH_TOKEN" not in os.environ, reason="GH_TOKEN not set")
|
||||
def test_zizmor_online_grafana_9f212d11d0ac(benchmark):
|
||||
"""
|
||||
Runs `zizmor --format=plain --no-exit-codes --no-config grafana/grafana@9f212d11d0ac`
|
||||
"""
|
||||
|
||||
benchmark.pedantic(
|
||||
zizmor,
|
||||
args=(
|
||||
[
|
||||
"--format=plain",
|
||||
"--no-exit-codes",
|
||||
"--no-config",
|
||||
"grafana/grafana@9f212d11d0ac",
|
||||
],
|
||||
),
|
||||
warmup_rounds=2,
|
||||
iterations=10,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif("GH_TOKEN" not in os.environ, reason="GH_TOKEN not set")
|
||||
def test_zizmor_online_gha_hazmat_da3c3cd(benchmark):
|
||||
"""
|
||||
Runs `zizmor --format=plain --no-exit-codes --no-config woodruffw/gha-hazmat@da3c3cd`
|
||||
"""
|
||||
|
||||
benchmark.pedantic(
|
||||
zizmor,
|
||||
args=(
|
||||
[
|
||||
"--format=plain",
|
||||
"--no-exit-codes",
|
||||
"--no-config",
|
||||
"woodruffw/gha-hazmat@da3c3cd",
|
||||
],
|
||||
),
|
||||
warmup_rounds=2,
|
||||
iterations=10,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif("GH_TOKEN" not in os.environ, reason="GH_TOKEN not set")
|
||||
def test_zizmor_online_cpython_48f88310044c(benchmark):
|
||||
"""
|
||||
Runs `zizmor --format=plain --no-exit-codes --no-config python/cpython@48f88310044c`
|
||||
"""
|
||||
|
||||
benchmark.pedantic(
|
||||
zizmor,
|
||||
args=(
|
||||
[
|
||||
"--format=plain",
|
||||
"--no-exit-codes",
|
||||
"--no-config",
|
||||
"python/cpython@48f88310044c",
|
||||
],
|
||||
),
|
||||
warmup_rounds=2,
|
||||
iterations=10,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue