Skip to content

Commit 418cd68

Browse files
authored
[asv] Pushing to s3 (#2246)
1 parent 30f7c08 commit 418cd68

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

python/README-benchmarks.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,23 @@ You can run the benchmark suite by doing the following:
77
2. Run ``asv dev`` in this directory.
88

99
To run ASV inside docker, you can use the following command:
10-
`docker run --rm --shm-size=10G --memory=10G $DOCKER_SHA bash -c '/ray/test/jenkins_tests/run_asv.sh'`
10+
``docker run --rm --shm-size=10G --memory=10G $DOCKER_SHA bash -c '/ray/test/jenkins_tests/run_asv.sh'``
11+
12+
Visualizing Benchmarks
13+
======================
14+
15+
To visualize benchmarks, you must copy the S3 bucket down to `$RAY_DIR/python`. Assuming asv is installed,
16+
17+
.. code-block::
18+
19+
cd $RAY_DIR/python
20+
aws s3 sync s3://$BUCKET/ASV/ .
21+
22+
Then, you can run:
23+
24+
.. code-block::
25+
26+
asv publish --no-pull
27+
asv preview
28+
29+
This creates the directory and then launches a server.

python/asv.conf.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// The URL or local path of the source code repository for the
1313
// project being benchmarked
14-
"repo": ".",
14+
"repo": "../",
1515

1616
// List of branches to benchmark. If not provided, defaults to "master"
1717
// (for git) or "default" (for mercurial).
@@ -101,7 +101,7 @@
101101

102102
// The directory (relative to the current directory) that raw benchmark
103103
// results are stored in. If not provided, defaults to "results".
104-
// "results_dir": "results",
104+
"results_dir": "ASV_RESULTS",
105105

106106
// The directory (relative to the current directory) that the html tree
107107
// should be written to. If not provided, defaults to "html".

test/jenkins_tests/run_asv.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@ set -e
66
# Show explicitly which commands are currently running.
77
set -x
88

9+
BUCKET_NAME=ray-integration-testing/ASV
10+
COMMIT=$(cat /ray/git-rev)
11+
ASV_RESULTS_DIR=/ray/python/ASV_RESULTS
12+
pip install awscli
13+
14+
# Install Ray fork of ASV
915
git clone https://github.com/ray-project/asv.git /tmp/asv/ || true
1016
cd /tmp/asv/
1117
pip install -e .
1218

1319
cd /ray/python/
14-
asv machine --yes
15-
asv run --show-stderr --python=same --force-record-commit=$(cat ../git-rev)
20+
asv machine --machine jenkins
21+
mkdir $ASV_RESULTS_DIR || true
22+
aws s3 cp s3://$BUCKET_NAME/ASV_RESULTS/benchmarks.json $ASV_RESULTS_DIR/benchmarks.json || true
23+
24+
asv run --show-stderr --python=same --force-record-commit=$COMMIT
25+
26+
aws s3 cp $ASV_RESULTS_DIR/benchmarks.json s3://$BUCKET_NAME/ASV_RESULTS/benchmarks_$COMMIT.json
27+
aws s3 sync $ASV_RESULTS_DIR/ s3://$BUCKET_NAME/ASV_RESULTS/

0 commit comments

Comments
 (0)