Skip to content

Commit

Permalink
update benchmark test
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonwang371 committed Dec 21, 2022
1 parent 5dd1eb4 commit 02fd7fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion benchmark/simple.py → benchmark/basic.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 02fd7fd

Please sign in to comment.