Skip to content

Commit

Permalink
Merge PR coq#19938: coq_makefile produce timing info for coqdep
Browse files Browse the repository at this point in the history
Reviewed-by: ppedrot
Reviewed-by: gares
Co-authored-by: ppedrot <[email protected]>
  • Loading branch information
coqbot-app[bot] and ppedrot authored Dec 19, 2024
2 parents 734ec43 + 093dd6e commit f64f690
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ROCQ DEP VFILES
.Makefile.d (ignored)
ROCQ compile Slow.v
Slow.vo (real: 0.04, user: 0.02, sys: 0.01, mem: 45512 ko)
ROCQ compile Fast.v
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ROCQ DEP VFILES
.Makefile.d (ignored)
ROCQ compile Slow.v
Slow.vo (real: 0.40, user: 0.35, sys: 0.04, mem: 394968 ko)
ROCQ compile Fast.v
Expand Down
10 changes: 10 additions & 0 deletions test-suite/coq-makefile/timing-per-file/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

. ../timing-template/init.sh

rm -rf _test
mkdir _test
find . -maxdepth 1 -not -name . -not -name _test -exec cp -r '{}' -t _test ';'
cd _test

# we delete the timings for coqdep because they're too close to 0
# so testing them is hard

cd before/
rocq makefile -f _CoqProject -o Makefile
make cleanall
make make-pretty-timed-before TGTS="all" -j1 || exit $?
sed -i.bak 's/.Makefile.d .*/.Makefile.d (ignored)/' time-of-build-before.log

cd ../after/

Expand All @@ -14,6 +23,7 @@ make cleanall

make make-pretty-timed-after TGTS="all" -j1 || exit $?
rm -f time-of-build-before.log
sed -i.bak 's/.Makefile.d .*/.Makefile.d (ignored)/' time-of-build-after.log

make print-pretty-timed-diff TIMING_SORT_BY=diff TIME_OF_BUILD_BEFORE_FILE=../before/time-of-build-before.log
cp ../before/time-of-build-before.log ./
Expand Down
2 changes: 1 addition & 1 deletion tools/CoqMakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ VDFILE_FLAGS:=$(if @PROJECT_FILE@,-f @PROJECT_FILE@,) $(CMDLINE_COQLIBS) $(CMDLI

$(VDFILE): @PROJECT_FILE@ $(VFILES)
$(SHOW)'ROCQ DEP VFILES'
$(HIDE)$(COQDEP) -vos -dyndep var $(VDFILE_FLAGS) $(redir_if_ok)
$(HIDE)$(TIMER) $(COQDEP) -vos -dyndep var $(VDFILE_FLAGS) $(redir_if_ok)

# Misc ########################################################################

Expand Down

0 comments on commit f64f690

Please sign in to comment.