Skip to content

Instantly share code, notes, and snippets.

@webhive
Last active January 2, 2016 02:29
Show Gist options
  • Save webhive/8237326 to your computer and use it in GitHub Desktop.
Save webhive/8237326 to your computer and use it in GitHub Desktop.
Wintersmith benchmark

Measurement

There was a script written for benchmark wintersmith-test.sh.

Result file has columns:

  • Number of posts
  • Generattion time in seconds

Directory structure

  • forlder wintersmith-bench - this directory contains sample wintersmith project
  • file wintersmith-test.sh - test script itself

System

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

Running under

$ wintersmith -V
2.0.10-pre with @jeromew patches

Results

Generation time vs Number of posts (after latest patches from @jeromew)

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
5;0.75;6194676
105;1.62;6190620
205;2.41;6187300
305;3.16;6183604
405;3.99;6179896
505;4.81;6175088
605;5.56;6171288
705;7.16;5558424
805;7.49;5434572
905;8.03;5468856
1005;9.06;5410144
1105;9.47;5366616
1205;10.81;5300136
1305;11.50;5233176
1405;12.18;5246204
1505;12.86;5208576
1605;14.23;5189036
1705;14.63;5166716
1805;15.53;5176644
1905;16.01;5221320
2005;16.60;5344452
2105;17.21;5404888
2205;18.39;5446136
2305;18.72;5440748
2405;20.12;5441788
2505;20.96;5437424
2605;21.89;5438240
2705;22.29;5432600
2805;22.85;5425608
2905;24.34;5424596
3005;24.71;5388644
3105;25.60;5383460
3205;26.60;5399444
#!/bin/bash
WINTERSMITH_ROOT='./wintersmith-bench'
WINTERSMITH_PAGES_ROOT="${WINTERSMITH_ROOT}/contents/articles"
# Remove all the test files
rm -rf $WINTERSMITH_PAGES_ROOT/test-*-*/
wintersmith -V
# Loop throught the batches
for i in {0..100}
do
FILES_COUNT=`ls $WINTERSMITH_PAGES_ROOT | wc -l`
# Measure
cd ${WINTERSMITH_ROOT}
ELAPSED_TIME=`/usr/bin/time -f %e wintersmith build 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 -R "${WINTERSMITH_PAGES_ROOT}/another-test/" "${WINTERSMITH_PAGES_ROOT}/test-${i}-${j}/"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment