-
Notifications
You must be signed in to change notification settings - Fork 100
Benchmarking
Joris Roovers edited this page Nov 27, 2019
·
2 revisions
To get idea of memory consumption, run gitlint against itself for 10 times. IMPORTANT:
- We use
/usr/bin/time -l
below - this works on MacOS. On linux use/usr/bin/time -v
- Use the full path
/usr/bin/time
not justtime
(see https://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix-process) MacOS In bytes
for i in $(seq 1 10); do /usr/bin/time -l gitlint -s --commits HEAD 2>&1; done | awk '/maximum/{print $1; count++; sum+=$1}; END {printf "---\nCOUNT=%i\nSUM=%i\nAVG=%2.f\n",count,sum,sum/count}'
Linux In kbytes
for i in $(seq 1 10); do /usr/bin/time -v gitlint -s 2>&1; done | awk -F ":" '/Maximum/{print $2; count++; sum+=$2}; END {printf "---\nCOUNT=%i\nSUM=%i\nAVG=%2.f\n",count,sum,sum/count}'
COUNT=10
SUM=257728512
AVG=25772851