Skip to content

Commit 159be34

Browse files
committed
update examples for the new cosmic-ray
1 parent 0056307 commit 159be34

File tree

4 files changed

+48
-14
lines changed

4 files changed

+48
-14
lines changed

cosmic-ray-12way.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e
3+
4+
cosmic-ray init cosmic-ray-12way.toml session.sqlite
5+
cosmic-ray baseline --session-file session.baseline.sqlite cosmic-ray-12way.toml
6+
cr-report --show-output session.baseline.sqlite
7+
# some mutations cause huge memory use, so put it in a cgroup
8+
# systemd-run --user --scope -p MemoryMax=8G -p MemoryHigh=8G cr-http-workers cosmic-ray-12way.toml .
9+
cr-http-workers cosmic-ray-12way.toml .
10+
cosmic-ray exec cosmic-ray-12way.toml session.sqlite
11+
cr-report session.sqlite
12+
cr-html session.sqlite > session.html
13+
cr-rate --estimate --fail-over 29 --confidence 99.9 session.sqlite

cosmic-ray-12way.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[cosmic-ray]
2+
module-path = "src"
3+
timeout = 20.0
4+
excluded-modules = ['src/ecdsa/_sha3.py', 'src/ecdsa/_version.py', 'src/ecdsa/test*']
5+
test-command = "pytest -x --fast -m 'not slow' src/"
6+
7+
[cosmic-ray.distributor]
8+
name = "http"
9+
10+
[cosmic-ray.distributor.http]
11+
worker-urls = [
12+
"http://localhost:9870",
13+
"http://localhost:9871",
14+
"http://localhost:9872",
15+
"http://localhost:9873",
16+
"http://localhost:9874",
17+
"http://localhost:9875",
18+
"http://localhost:9876",
19+
"http://localhost:9877",
20+
"http://localhost:9878",
21+
"http://localhost:9879",
22+
"http://localhost:9880",
23+
"http://localhost:9881",
24+
"http://localhost:9882"
25+
]
26+
27+
[cosmic-ray.filters.git-filter]
28+
branch = "master"

cosmic-ray.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
set -e
33

44
cosmic-ray init cosmic-ray.toml session.sqlite
5-
cosmic-ray baseline --report session.sqlite
5+
cosmic-ray baseline --session-file session.baseline.sqlite cosmic-ray.toml
66
cr-report --show-output session.baseline.sqlite
77
# some mutations cause huge memory use, so put it in a cgroup
8-
# systemd-run --user --scope -p MemoryMax=2G -p MemoryHigh=2G cosmic-ray exec session.sqlite
9-
cosmic-ray exec session.sqlite
8+
# systemd-run --user --scope -p MemoryMax=2G -p MemoryHigh=2G cosmic-ray exec cosmic-ray.toml session.sqlite
9+
cosmic-ray exec cosmic-ray.toml session.sqlite
1010
cr-report session.sqlite
1111
cr-html session.sqlite > session.html
1212
cr-rate --estimate --fail-over 29 --confidence 99.9 session.sqlite

cosmic-ray.toml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
[cosmic-ray]
22
module-path = "src"
3-
python-version = ""
43
timeout = 20.0
5-
exclude-modules = ['src/ecdsa/_version.py', 'src/ecdsa/test*']
4+
exclude-modules = ['src/ecdsa/_sha3.py', 'src/ecdsa/_version.py', 'src/ecdsa/test*']
65
test-command = "pytest -x --fast -m 'not slow' src/"
76

8-
[cosmic-ray.execution-engine]
7+
[cosmic-ray.distributor]
98
name = "local"
109

11-
[cosmic-ray.cloning]
12-
method = "copy"
13-
commands = []
14-
15-
[cosmic-ray.interceptors]
16-
enabled = [ "spor", "pragma_no_mutate", "operators-filter",]
17-
18-
[cosmic-ray.operators-filter]
10+
[cosmic-ray.filters.git-filter]
11+
branch = "master"

0 commit comments

Comments
 (0)