Skip to content

Instantly share code, notes, and snippets.

@webhive
Last active April 11, 2017 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webhive/7956223 to your computer and use it in GitHub Desktop.
Save webhive/7956223 to your computer and use it in GitHub Desktop.
Perfomance benchmark of DocPad site generation

Measurement described

  1. docpad run
  2. Selected 'Twitter Bootstrap with Coffeekup' skeleton
  3. Remove docpad-plugin-cleanurl
  4. docpad --env static generate
  5. Recored the time line
  6. Add 100 files to the src/documents/posts directory
  7. Goto #4

There was a script written for benchmark docpad-test.sh Result file has columns:

  • Number of posts
  • Generattion time in seconds
  • Free memory

System

  • Linux 3.12.4-1-ARCH x86_64
  • 8 GB RAM
  • i7 CPU

Running under

  • docpad --version 6.57.2

Results

Generation time vs Number of posts

DocPad site generation benchmark plot

#!/bin/sh
DOCPAD_ROOT='./docpad-bench'
DOCPAD_PAGES_ROOT="${DOCPAD_ROOT}/src/documents/posts"
# Remove all the test files
rm -f "${DOCPAD_PAGES_ROOT}/*-auto-generated-post.html.md"
# Loop throught the batches
for i in {0..100}
do
FILES_COUNT=`expr $i \* 100 + 3`
# rm -rf "${DOCPAD_ROOT}/out"
# rm -rf "${DOCPAD_ROOT}/*.db"
# Measure
cd ${DOCPAD_ROOT}
ELAPSED_TIME=`/usr/bin/time -f %e docpad generate --env static 2>&1 > /dev/null`
FREE_MEMORY=`cat /proc/meminfo | grep MemFree: | awk '{print $2}'`
cd ..
echo "${FILES_COUNT};${ELAPSED_TIME};${FREE_MEMORY}"
# Add batch of sample pages
for j in {1..100}
do
cp "${DOCPAD_PAGES_ROOT}/sample.html.md" "${DOCPAD_PAGES_ROOT}/${i}-${j}-auto-generated-post.html.md"
done
done
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
3;3.14;1449284
103;23.66;1472096
203;54.09;1469492
303;96.50;1454892
403;154.92;1398040
503;241.91;1459592
603;352.65;1448740
703;504.18;1465648
803;695.41;1457736
903;926.15;1449592
1003;1216.40;1443748
1103;1551.60;1413172
1203;1964.38;1413096
1303;2808.34;1421000
1403;3031.70;1393764
1503;3564.99;1393316
1603;4249.39;1344260
1703;5032.20;1371160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment