Skip to content

Commit

Permalink
Merge pull request #2 from meta-introspector/feature/test-report
Browse files Browse the repository at this point in the history
Feature/test report
  • Loading branch information
jmikedupont2 authored Sep 23, 2024
2 parents 24519d4 + 5b13c20 commit b549eda
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.dockerignore
.git
Dockerfile
Dockerfile
_clinic
data
perf-reporting/output
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add filter=lfs diff=lfs merge=lfs -text
_clinic/perf/v3/report2.txt filter=lfs diff=lfs merge=lfs -text
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ flycheck_*.el
/perf-reporting/output/tmp/
/perf-reporting/output/untar/
/perf-reporting/output/unzip/
isolate-*.log
ltrace.txt
perf.data
perf.data.old
report.txt
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
test:
docker compose build
docker compose up
docker compose build mina-local-network
docker compose up mina-local-network
8 changes: 8 additions & 0 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,11 @@ mina-local-network-1 |
mina-local-network-1 | $ tar xvf src/lib/provable/test/primitives.test.ts.perf.data.tar.bz2 -C ~/.debug
```


# next step

`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`
`perf report --stdio > report2.txt`

`clinic doctor -- node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js src/lib/mina/token.test.ts`
14 changes: 13 additions & 1 deletion run-all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,22 @@ TESTS="src/lib/provable/test/merkle-list.test.ts src/lib/provable/test/merkle-tr
for testname in $TESTS;

do
perf record -o ${testname}.perf.data -F 999 --call-graph dwarf node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname} > ${testname}.reportout.txt 2>&1
perfdata=${testname}.perf.data
clinic flame -- node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname}
clinic doctor -- node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname}
clinic bubbleprof -- node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname}
clinic heapprofiler -- node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname}

perf record -g -o ${testname}.perf.data -F 999 --call-graph dwarf node --perf-basic-prof ./node_modules/.bin/../jest/bin/jest.js ${testname} > ${testname}.reportout.txt 2>&1
perf archive ${testname}.perf.data
perf report -i "${perfdata}" --verbose --stdio --header > "${perfdata}.header.txt" 2>&1
perf report -i "${perfdata}" --verbose --stdio --stats > "${perfdata}.stats.txt" 2>&1
perf script -F +pid -i "${perfdata}" > "${perfdata}.script.txt" 2>&1
perf report --stdio -i "${perfdata}" > "${perfdata}.report.txt" 2>&1

cp ${testname}.* /tmp/perf/
mkdir /tmp/perf/clinic
cp -r .clinic/* /tmp/perf/clinic
done

tar -czf /tmp/perf.data.tar.gz /tmp/perf/*
Expand Down

0 comments on commit b549eda

Please sign in to comment.