Skip to content

Commit

Permalink
chore: fix "max dynamic symbols" metric (leanprover#4669)
Browse files Browse the repository at this point in the history
As we do not build multiple shared libraries on non-Windows anymore,
count the max exported symbols per static library instead.
Unfortunately, this still does seem to match the number on Windows.
  • Loading branch information
Kha authored Jul 8, 2024
1 parent d6c6e16 commit f6265e2
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/bench/speedcenter.exec.velcom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@
run_config:
cwd: ../../
cmd: |
bash -c "
set -euxo pipefail &&
echo -n 'lines: ' &&
set -euxo pipefail
echo -n 'lines: '
find src -name '*.lean' -print0 | wc -l --files0-from=- | tail -1 | cut -d' ' -f 1
echo -n 'bytes .olean: ' &&
echo -n 'bytes .olean: '
find ${BUILD:-build/release}/stage2/lib/lean -name '*.olean' -print0 | wc -c --files0-from=- | tail -1 | cut -d' ' -f 1
echo -n 'lines C: ' &&
echo -n 'lines C: '
find ${BUILD:-build/release}/stage2/lib/temp -name '*.c' -print0 | wc -l --files0-from=- | tail -1 | cut -d' ' -f 1
echo -n 'lines C++: ' &&
find src \( -name '*.h' -o -name '*.cpp' \) -print0 | wc -l --files0-from=- | tail -1 | cut -d' ' -f 1 &&
echo -n 'max dynamic symbols: ' &&
find ${BUILD:-build/release}/stage2/lib/lean -name '*.so' -exec bash -c 'nm --dynamic --defined-only {} | wc -l' \; | sort | head -n1
"
echo -n 'lines C++: '
find src \( -name '*.h' -o -name '*.cpp' \) -print0 | wc -l --files0-from=- | tail -1 | cut -d' ' -f 1
echo -n 'max dynamic symbols: '
find ${BUILD:-build/release}/stage2/lib/lean -name '*.a' -exec bash -c 'nm {} | grep " T " | wc -l' \; | sort --reverse --numeric-sort | head -n1
max_runs: 1
runner: output
- attributes:
Expand Down

0 comments on commit f6265e2

Please sign in to comment.