-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add benchmark script, still WIP
- Loading branch information
1 parent
37d93ad
commit 5864ec1
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
# set -x | ||
set -e | ||
|
||
tmpdir=$(mktemp -d) | ||
echo $tmpdir | ||
cd $tmpdir | ||
|
||
python --version | ||
python -m venv . | ||
source ./bin/activate | ||
|
||
python -m pip install sphinx==v7.3.7 sphinxnotes-fasthtml >/dev/null | ||
pip show sphinx sphinxnotes-fasthtml | ||
|
||
compare() { | ||
echo "" >> index.rst | ||
make SPHINXOPTS=-Q html | ||
echo ">>> Fast build" | ||
echo "Another line" >> index.rst | ||
time make SPHINXOPTS=-Q fast | ||
echo ">>> Standard build" | ||
echo "Another line" >> index.rst | ||
time make SPHINXOPTS=-Q html | ||
} | ||
|
||
echo "=== Sphinx" | ||
git clone --quiet --branch v7.3.7 --depth 1 https://github.com/sphinx-doc/sphinx.git >/dev/null | ||
cd sphinx/doc | ||
echo "extensions.append('sphinxnotes.fasthtml')" >> conf.py | ||
cat <<'EOF' >> Makefile | ||
fast: Makefile | ||
@$(SPHINXBUILD) -b fasthtml "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) | ||
EOF | ||
compare | ||
cd .. | ||
|
||
# rm -rf $tmpdir |