Skip to content

Commit 28807f2

Browse files
author
mike dupont
committed
now to test on github
1 parent db5a825 commit 28807f2

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

README-dev.md

+7-10
Original file line numberDiff line numberDiff line change
@@ -395,24 +395,22 @@ cpu-clock:ppp stats:
395395

396396
# Summary
397397

398-
This set of tools is for batch processing perf data.
398+
This set of tools is for batch collecting and processing performance and coverage data customized for o1js mina.
399399

400+
### Useful Commands
400401

401-
# latest update
402+
We can download an artifact from github using gh ai to basically authenticate a curl for us.
402403

404+
This is an example of downloading an artifact directly, you can find examples in the github build logs for the jobs
403405
`gh api https://api.github.com/repos/meta-introspector/o1js/actions/artifacts/1961929543/zip > data/perf.data.zip`
404-
it contains
405-
perf.data.tar.gz
406406

407-
This contains
408-
`tmp/perf/group.test.ts.perf.data.tar.bz2`
409-
that is mounted in
410-
`/app/perf-reporting/output/`
407+
In This version it contains perf.data.tar.gz, we have evolved the artifact contents so it will change to slightly different names in future versions. This documentation needs to be edited again to reflect that.
411408

409+
That perf data tar gzip contains `tmp/perf/group.test.ts.perf.data.tar.bz2`
410+
that is mounted in `/app/perf-reporting/output/`
412411

413412
it says in the logs
414413
```
415-
wherever you need to run 'perf report' on.
416414
mina-local-network-1 | + cp src/lib/provable/test/provable.test.ts.perf.data src/lib/provable/test/provable.test.ts.perf.data.tar.bz2 src/lib/provable/test/provable.test.ts.reportout.txt /tmp/perf/
417415
mina-local-network-1 | + for testname in $TESTS
418416
mina-local-network-1 | + perf record -o src/lib/provable/test/primitives.test.ts.perf.data -F 999 --call-graph dwarf node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js src/lib/provable/test/primitives.test.ts
@@ -423,7 +421,6 @@ mina-local-network-1 | $ tar xvf src/lib/provable/test/primitives.test.ts.perf.
423421
424422
```
425423

426-
427424
# next step
428425

429426
`perf record -g -F 999 --call-graph dwarf node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js src/lib/mina/token.test.ts`

run-all-tests.sh

+17-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ echo 2 > /proc/sys/kernel/perf_event_paranoid
3636
# PASS src/lib/mina/precondition.test.ts (12.688 s)
3737
# PASS src/lib/mina/token.test.ts (46.593 s)
3838

39-
TESTS=`ls -b src/lib/provable/test/*.test.ts src/lib/mina/*.test.ts `
39+
TESTS="src/lib/provable/test/merkle-list.test.ts src/lib/provable/test/merkle-tree.test.ts src/lib/provable/test/scalar.test.ts src/lib/provable/test/merkle-map.test.ts src/lib/provable/test/provable.test.ts src/lib/provable/test/primitives.test.ts src/lib/provable/test/group.test.ts src/lib/provable/test/int.test.ts src/lib/mina/precondition.test.ts src/lib/mina/token.test.ts"
40+
# FIXME this all tests is not used because many of them fail.
41+
ALL_TESTS=`ls -b src/lib/provable/test/*.test.ts src/lib/mina/*.test.ts `
4042
#src/lib/provable/test/*unit-test.ts
4143
#src/lib/mina/*.unit-test.ts
4244

@@ -45,8 +47,9 @@ TESTS=`ls -b src/lib/provable/test/*.test.ts src/lib/mina/*.test.ts `
4547
export NO_INSIGHT=true
4648
export JESTOPTS=--collectCoverage
4749
export NODEOPT1="--prof --expose-gc"
48-
for testname in $TESTS;
49-
do
50+
51+
run_test() {
52+
testname=$1
5053
export MULTIPLE="${testname}"
5154
export perfdata="${testname}.perf.data"
5255
OUTPUT_DIR2="${OUTPUT_DIR}/$testname/"
@@ -64,15 +67,23 @@ do
6467
perf report -i "${perfdata}" --verbose --stdio --stats > "${perfdata}.stats.txt" 2>&1
6568
perf script -F +pid -i "${perfdata}" > "${perfdata}.script.txt" 2>&1
6669
perf report --stdio -i "${perfdata}" > "${perfdata}.report.txt" 2>&1
67-
70+
ls -latr jit*.dump
6871
rm -r jit*.dump
69-
7072

7173
mv ${testname}.perf.data "${OUTPUT_DIR2}/perf_data"
7274
mv "${testname}.*.txt" "${OUTPUT_DIR2}/perf_data"
7375
mv .clinic/* "${OUTPUT_DIR2}clinic/"
7476
mv coverage/* "${OUTPUT_DIR2}coverage/"
75-
mv *.log "${OUTPUT_DIR2}log/"
77+
mv *.log "${OUTPUT_DIR2}log/"
78+
du -s "${OUTPUT_DIR2}"
79+
find "${OUTPUT_DIR2}"
80+
ls -latr "${OUTPUT_DIR2}"
81+
}
82+
83+
for testname in $TESTS;
84+
do
85+
results=$(run_test $testname)
86+
echo $results
7687
done
7788

7889
tar -czf /tmp/perf.data.tar.gz /tmp/perf/*

0 commit comments

Comments
 (0)