Skip to content

Commit b3669bb

Browse files
committed
Initial commit
0 parents  commit b3669bb

23 files changed

+1978
-0
lines changed

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*._*
2+
*.so
3+
*~
4+
.#*
5+
.DS_Store
6+
/build
7+
__pycache__/
8+
/*.egg
9+
/*.egg-info
10+
/dist
11+
/.cache
12+
docs/_build

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2016 MagicStack Inc. http://magic.io
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.PHONY: build clean
2+
3+
build:
4+
$(MAKE) -C _golang
5+
$(MAKE) -C _nodejs
6+
$(MAKE) -C _python
7+
8+
clean:
9+
$(MAKE) -C _golang clean
10+
$(MAKE) -C _nodejs clean
11+
$(MAKE) -C _python clean

README.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
PostgreSQL Client Driver Performance Benchmarking Toolbench
2+
===========================================================
3+
4+
This is a collection of scripts intended to benchmark the efficiency of
5+
various implementations of PostgreSQL client drivers.
6+
7+
8+
Installation and Use
9+
--------------------
10+
11+
Install the following:
12+
13+
- git
14+
- NodeJS
15+
- Go 1.6
16+
- Python 3
17+
- Numpy
18+
19+
Prepare the toolbench by running ``make``. This will download and build
20+
the driver implementations to prepare for benchmarks.
21+
22+
The benchmarks can then be ran with ``./pgbench``. Use
23+
``./pgbench --help`` for various options, including selective benchmark
24+
running.

_golang/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/pgbench_golang
2+
/_go

_golang/Makefile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: clean
2+
3+
4+
pgbench_golang:
5+
rm -rf "$(CURDIR)/_go" && mkdir "$(CURDIR)/_go"
6+
GOPATH="$(CURDIR)/_go" go get gopkg.in/alecthomas/kingpin.v2 \
7+
github.com/lib/pq \
8+
github.com/jackc/pgx
9+
mkdir -p "$(CURDIR)/_go/src/github.com/magicstack/pgbench/"
10+
ln -s "$(CURDIR)" "$(CURDIR)/_go/src/github.com/magicstack/pgbench/_golang"
11+
GOPATH="$(CURDIR)/_go" go build -o pgbench_golang github.com/magicstack/pgbench/_golang
12+
rm -rf "$(CURDIR)/_go"
13+
14+
clean:
15+
rm -f "$(CURDIR)/pgbench_golang"
16+
rm -rf "$(CURDIR)/_go"

0 commit comments

Comments
 (0)