[documentation] Minor whitespace changes

This commit is contained in:
Ciprian Dorin Craciun 2019-08-13 15:04:44 +03:00
parent ff1a8f1029
commit 410afdfb1c

View file

@ -287,7 +287,7 @@ Ignored files
* any file with the following prefixes: ``.``, ``#``; * any file with the following prefixes: ``.``, ``#``;
* any file with the following suffixes: ``~``, ``#``, ``.log``, ``.tmp``, ``.temp``, ``.lock``; * any file with the following suffixes: ``~``, ``#``, ``.log``, ``.tmp``, ``.temp``, ``.lock``;
* any file that contains the following: ``#``; * any file that contains the following: ``#``;
* any file that exactly matches the following:: ``Thumbs.db``, ``.DS_Store``; * any file that exactly matches the following: ``Thumbs.db``, ``.DS_Store``;
* (at the moment these rules are not configurable through flags;) * (at the moment these rules are not configurable through flags;)
@ -318,8 +318,8 @@ Examples
* fetch and extract the Python 3.7 documentation HTML archive: :: * fetch and extract the Python 3.7 documentation HTML archive: ::
curl -s -S -f \ curl -s -S -f \
-o ./python-3.7.3-docs-html.tar.bz2 \ -o ./python-3.7.3-docs-html.tar.bz2 \
https://docs.python.org/3/archives/python-3.7.3-docs-html.tar.bz2 \ https://docs.python.org/3/archives/python-3.7.3-docs-html.tar.bz2 \
# #
tar -x -j -v -f ./python-3.7.3-docs-html.tar.bz2 tar -x -j -v -f ./python-3.7.3-docs-html.tar.bz2
@ -327,49 +327,49 @@ Examples
* create the CDB archive (without any compression): :: * create the CDB archive (without any compression): ::
kawipiko-archiver \ kawipiko-archiver \
--archive ./python-3.7.3-docs-html-nozip.cdb \ --archive ./python-3.7.3-docs-html-nozip.cdb \
--sources ./python-3.7.3-docs-html \ --sources ./python-3.7.3-docs-html \
--debug \ --debug \
# #
* create the CDB archive (with ``gzip`` compression): :: * create the CDB archive (with ``gzip`` compression): ::
kawipiko-archiver \ kawipiko-archiver \
--archive ./python-3.7.3-docs-html-gzip.cdb \ --archive ./python-3.7.3-docs-html-gzip.cdb \
--sources ./python-3.7.3-docs-html \ --sources ./python-3.7.3-docs-html \
--compress gzip \ --compress gzip \
--debug \ --debug \
# #
* create the CDB archive (with ``brotli`` compression): :: * create the CDB archive (with ``brotli`` compression): ::
kawipiko-archiver \ kawipiko-archiver \
--archive ./python-3.7.3-docs-html-brotli.cdb \ --archive ./python-3.7.3-docs-html-brotli.cdb \
--sources ./python-3.7.3-docs-html \ --sources ./python-3.7.3-docs-html \
--compress brotli \ --compress brotli \
--debug \ --debug \
# #
* serve the CDB archive (with ``gzip`` compression): :: * serve the CDB archive (with ``gzip`` compression): ::
kawipiko-server \ kawipiko-server \
--bind 127.0.0.1:8080 \ --bind 127.0.0.1:8080 \
--archive ./python-3.7.3-docs-html-gzip.cdb \ --archive ./python-3.7.3-docs-html-gzip.cdb \
--archive-mmap \ --archive-mmap \
--archive-preload \ --archive-preload \
--debug \ --debug \
# #
* compare sources and archive sizes: :: * compare sources and archive sizes: ::
du -h -s \ du -h -s \
\ \
./python-3.7.3-docs-html-nozip.cdb \ ./python-3.7.3-docs-html-nozip.cdb \
./python-3.7.3-docs-html-gzip.cdb \ ./python-3.7.3-docs-html-gzip.cdb \
./python-3.7.3-docs-html-brotli.cdb \ ./python-3.7.3-docs-html-brotli.cdb \
\ \
./python-3.7.3-docs-html \ ./python-3.7.3-docs-html \
./python-3.7.3-docs-html.tar.bz2 \ ./python-3.7.3-docs-html.tar.bz2 \
# #
45M ./python-3.7.3-docs-html-nozip.cdb 45M ./python-3.7.3-docs-html-nozip.cdb
@ -430,9 +430,9 @@ Fetch the sources
:: ::
git clone \ git clone \
--depth 1 \ --depth 1 \
https://github.com/volution/kawipiko.git \ https://github.com/volution/kawipiko.git \
/tmp/kawipiko/src \ /tmp/kawipiko/src \
# #
@ -451,15 +451,15 @@ Compile the Go binaries: ::
cd /tmp/kawipiko/src/sources cd /tmp/kawipiko/src/sources
go build \ go build \
-ldflags '-s' \ -ldflags '-s' \
-o /tmp/kawipiko/bin/kawipiko-archiver \ -o /tmp/kawipiko/bin/kawipiko-server \
./cmd/archiver.go \ ./cmd/server.go \
# #
go build \ go build \
-ldflags '-s' \ -ldflags '-s' \
-o /tmp/kawipiko/bin/kawipiko-server \ -o /tmp/kawipiko/bin/kawipiko-archiver \
./cmd/server.go \ ./cmd/archiver.go \
# #
@ -470,8 +470,11 @@ Deploy the binaries
:: ::
cp /tmp/kawipiko/bin/kawipiko-archiver /usr/local/bin cp \
cp /tmp/kawipiko/bin/kawipiko-server /usr/local/bin -t /usr/local/bin \
/tmp/kawipiko/bin/kawipiko-server \
/tmp/kawipiko/bin/kawipiko-archiver \
#
@ -828,22 +831,22 @@ Single process / single threaded
* execute the server (in-memory and indexed) (i.e. the "best case scenario"): :: * execute the server (in-memory and indexed) (i.e. the "best case scenario"): ::
kawipiko-server \ kawipiko-server \
--bind 127.0.0.1:8080 \ --bind 127.0.0.1:8080 \
--archive ./hello-world.cdb \ --archive ./hello-world.cdb \
--archive-inmem \ --archive-inmem \
--index-all \ --index-all \
--processes 1 \ --processes 1 \
--threads 1 \ --threads 1 \
# #
* execute the server (memory mapped) (i.e. the "the recommended scenario"): :: * execute the server (memory mapped) (i.e. the "the recommended scenario"): ::
kawipiko-server \ kawipiko-server \
--bind 127.0.0.1:8080 \ --bind 127.0.0.1:8080 \
--archive ./hello-world.cdb \ --archive ./hello-world.cdb \
--archive-mmap \ --archive-mmap \
--processes 1 \ --processes 1 \
--threads 1 \ --threads 1 \
# #
@ -855,11 +858,11 @@ Single process / two threads
* execute the server (memory mapped): :: * execute the server (memory mapped): ::
kawipiko-server \ kawipiko-server \
--bind 127.0.0.1:8080 \ --bind 127.0.0.1:8080 \
--archive ./hello-world.cdb \ --archive ./hello-world.cdb \
--archive-mmap \ --archive-mmap \
--processes 1 \ --processes 1 \
--threads 2 \ --threads 2 \
# #
@ -869,23 +872,23 @@ Load generators
* 512 concurrent connections (handled by 2 threads): :: * 512 concurrent connections (handled by 2 threads): ::
wrk \ wrk \
--threads 2 \ --threads 2 \
--connections 512 \ --connections 512 \
--timeout 1s \ --timeout 1s \
--duration 30s \ --duration 30s \
--latency \ --latency \
http://127.0.0.1:8080/ \ http://127.0.0.1:8080/index.txt \
# #
* 4096 concurrent connections (handled by 2 threads): :: * 4096 concurrent connections (handled by 2 threads): ::
wrk \ wrk \
--threads 2 \ --threads 2 \
--connections 4096 \ --connections 4096 \
--timeout 1s \ --timeout 1s \
--duration 30s \ --duration 30s \
--latency \ --latency \
http://127.0.0.1:8080/ \ http://127.0.0.1:8080/index.txt \
# #
@ -902,11 +905,11 @@ Methodology notes
sudo -u root -n -E -P -- \ sudo -u root -n -E -P -- \
\ \
taskset -c 0,1 \ taskset -c 0,1 \
nice -n -19 -- \ nice -n -19 -- \
ionice -c 2 -n 0 -- \ ionice -c 2 -n 0 -- \
chrt -r 10 \ chrt -r 10 \
prlimit -n262144 -- \ prlimit -n262144 -- \
\ \
sudo -u "${USER}" -n -E -P -- \ sudo -u "${USER}" -n -E -P -- \
\ \
@ -918,11 +921,11 @@ Methodology notes
sudo -u root -n -E -P -- \ sudo -u root -n -E -P -- \
\ \
taskset -c 2,3 \ taskset -c 2,3 \
nice -n -19 -- \ nice -n -19 -- \
ionice -c 2 -n 0 -- \ ionice -c 2 -n 0 -- \
chrt -r 10 \ chrt -r 10 \
prlimit -n262144 -- \ prlimit -n262144 -- \
\ \
sudo -u "${USER}" -n -E -P -- \ sudo -u "${USER}" -n -E -P -- \
\ \