diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index bf3fa53..d8fad32 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -43,7 +43,10 @@ jobs: pip install -U "ray @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl" - name: Run Benchmark run: | - pytest benchmark/simple.py --benchmark-only --benchmark-json bm-result.json + ray start --head + pytest -v benchmark/basic.py --benchmark-only --benchmark-json bm-result.json + cat bm-result.json + ray stop - name: Store benchmark result uses: benchmark-action/github-action-benchmark@v1 with: diff --git a/benchmark/simple.py b/benchmark/basic.py old mode 100644 new mode 100755 similarity index 85% rename from benchmark/simple.py rename to benchmark/basic.py index f6f4ab1..b5e3d9c --- a/benchmark/simple.py +++ b/benchmark/basic.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -16,13 +17,15 @@ # import ray +from apache_beam.tools import fn_api_runner_microbenchmark as bm def run_pipeline(): + bm.run_benchmark(1, 10, 100, True) return None -def test_simple_benchmark(benchmark): +def test_basic_benchmark(benchmark): ray.init() res = benchmark(run_pipeline)