Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 8ab054f

Browse files
authored
Merge pull request #53 from startupturbo/NikolayS-patch-1
"Hello world" example, more details on installation
2 parents 14fe828 + 0b6233b commit 8ab054f

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,32 @@ Currently Supported Features
5353

5454
Requirements
5555
===
56-
To use Nancy CLI you need Linux or MacOS with installed Docker. If you plan
57-
to run experiments in AWS EC2 instances, you also need Docker Machine
58-
(https://docs.docker.com/machine/).
56+
1) To use Nancy CLI you need Linux or MacOS with installed Docker.
57+
58+
2) To run on AWS EC2 instances, you also need:
59+
* AWS CLI https://aws.amazon.com/en/cli/
60+
* Docker Machine https://docs.docker.com/machine/
61+
* jq https://stedolan.github.io/jq/
62+
5963

6064
Installation
6165
===
66+
67+
In the minimal configuration, only two steps are needed:
68+
69+
1) Install Docker (for Ubuntu/Debian: `sudo apt-get install docker`)
70+
2) Clone this repo and adjust `$PATH`:
6271
```bash
6372
git clone https://github.com/startupturbo/nancy
6473
echo "export PATH=\$PATH:"$(pwd)"/nancy" >> ~/.bashrc
6574
source ~/.bashrc
6675
```
6776

77+
Additionally, to allow use of AWS EC2 instances:
78+
3) Follow instructions https://docs.aws.amazon.com/cli/latest/userguide/installing.html
79+
4) Follow instructions https://docs.docker.com/machine/install-machine/
80+
5) install jq (for Ubuntu/Debian: `sudo apt-get install jq`)
81+
6882
Getting started
6983
===
7084
Start with these commands:
@@ -73,3 +87,25 @@ nancy help
7387
nancy run help
7488
```
7589

90+
"Hello World!"
91+
===
92+
```bash
93+
echo "create table hello_world as select i::int4 from generate_series(1, 1000000) _(i);" > ./sample.dump
94+
bzip2 ./sample.dump
95+
96+
# "Clean run": w/o index
97+
# (seqscan is expected, total time ~150ms, depending on resources)
98+
nancy run \
99+
--run-on localhost \
100+
--workload-custom-sql "select count(1) from hello_world where i between 100000 and 100010;" \
101+
--db-dump-path file://$(pwd)/sample.dump.bz2 --tmp-path /tmp
102+
103+
# Now check how a regular btree index affects performance
104+
# (expected total time: ~0.05ms)
105+
nancy run \
106+
--run-on localhost \
107+
--workload-custom-sql "select count(1) from hello_world where i between 100000 and 100010;" \
108+
--db-dump-path file://$(pwd)/sample.dump.bz2 --tmp-path /tmp \
109+
--target-ddl-do "create index i_hello_world_i on hello_world(i);" \
110+
--target-ddl-undo "drop index i_hello_world_i;"
111+
```

0 commit comments

Comments
 (0)