From 06775846dfd702dd8961f155e1c0a77592708c01 Mon Sep 17 00:00:00 2001 From: mike dupont Date: Sun, 22 Sep 2024 10:06:45 -0400 Subject: [PATCH 1/3] test report --- .dockerignore | 5 ++++- .gitattributes | 2 ++ .gitignore | 5 +++++ Makefile | 4 ++-- README-dev.md | 6 ++++++ run-all-tests.sh | 7 ++++++- 6 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .gitattributes diff --git a/.dockerignore b/.dockerignore index 5089a30e0..c0e7e60ca 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,6 @@ .dockerignore .git -Dockerfile \ No newline at end of file +Dockerfile +_clinic +data +perf-reporting/output \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..415d45d9c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +add filter=lfs diff=lfs merge=lfs -text +_clinic/perf/v3/report2.txt filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index e6e26048b..de7de7b05 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile b/Makefile index 41c7211cd..43ab53ee2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,3 @@ test: - docker compose build - docker compose up + docker compose build mina-local-network + docker compose up mina-local-network diff --git a/README-dev.md b/README-dev.md index f52702071..1aa8f0574 100644 --- a/README-dev.md +++ b/README-dev.md @@ -411,3 +411,9 @@ 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` diff --git a/run-all-tests.sh b/run-all-tests.sh index c901a9334..7fcd64338 100644 --- a/run-all-tests.sh +++ b/run-all-tests.sh @@ -35,8 +35,13 @@ 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 + 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/ done From e1114af55830bcbf5ed8391aad23f4410c63daa9 Mon Sep 17 00:00:00 2001 From: mike dupont Date: Sun, 22 Sep 2024 10:30:58 -0400 Subject: [PATCH 2/3] run clinic --- README-dev.md | 2 ++ run-all-tests.sh | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/README-dev.md b/README-dev.md index 1aa8f0574..c5f23338d 100644 --- a/README-dev.md +++ b/README-dev.md @@ -417,3 +417,5 @@ mina-local-network-1 | $ tar xvf src/lib/provable/test/primitives.test.ts.perf. `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` diff --git a/run-all-tests.sh b/run-all-tests.sh index 7fcd64338..564b705ce 100644 --- a/run-all-tests.sh +++ b/run-all-tests.sh @@ -36,6 +36,11 @@ for testname in $TESTS; do 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 @@ -44,6 +49,8 @@ do 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/* From a7b1a128e7cfa1005fc0f6cf873343bd597a7629 Mon Sep 17 00:00:00 2001 From: Mike DuPont Date: Sun, 22 Sep 2024 10:32:01 -0400 Subject: [PATCH 3/3] Update process-perf-results.yml --- .github/workflows/process-perf-results.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process-perf-results.yml b/.github/workflows/process-perf-results.yml index c3a3c4607..f916b7bad 100644 --- a/.github/workflows/process-perf-results.yml +++ b/.github/workflows/process-perf-results.yml @@ -39,8 +39,8 @@ jobs: WORKSPACE_DIR2: $GITHUB_WORKSPACE WORKSPACE_DIR: $GITHUB_WORKSPACE - - name: Archive results - uses: meta-introspector/upload-artifact@v4 - with: + - name: Archive results + uses: meta-introspector/upload-artifact@v4 + with: name: results.tgz path: perf-reporting/output/results.tgz