Skip to content

Commit 186d7d1

Browse files
authored
Merge pull request #11 from filipecosta90/perf
Upgrade readability, added Dockerfile and helper scripts
2 parents 6f783ab + 8c03e59 commit 186d7d1

31 files changed

+1440
-255
lines changed

.circleci/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Python CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-python/ for more details
4+
#
5+
version: 2.1
6+
jobs:
7+
build-multiarch-docker:
8+
machine:
9+
enabled: true
10+
steps:
11+
- checkout
12+
- run: |
13+
echo "$DOCKER_REDISBENCH_PWD" | base64 --decode | docker login --username $DOCKER_REDISBENCH_USER --password-stdin
14+
- run:
15+
name: Build
16+
command: |
17+
make -C benchmark/redisgraph docker-release
18+
no_output_timeout: 20m
19+
20+
workflows:
21+
version: 2
22+
commit:
23+
jobs:
24+
- build-multiarch-docker:
25+
filters:
26+
tags:
27+
only: /.*/
28+
branches:
29+
only: master

.gitignore

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# RedisGraph temp output
2+
benchmark/redisgraph/data/**
3+
benchmark/redisgraph/result_redisgraph/**
4+
5+
# redis RDB files
6+
*.rdb
7+
8+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
9+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
10+
11+
# User-specific stuff
12+
.idea/**/workspace.xml
13+
.idea/**/tasks.xml
14+
.idea/**/usage.statistics.xml
15+
.idea/**/dictionaries
16+
.idea/**/shelf
17+
18+
# Generated files
19+
.idea/**/contentModel.xml
20+
21+
# Sensitive or high-churn files
22+
.idea/**/dataSources/
23+
.idea/**/dataSources.ids
24+
.idea/**/dataSources.local.xml
25+
.idea/**/sqlDataSources.xml
26+
.idea/**/dynamic.xml
27+
.idea/**/uiDesigner.xml
28+
.idea/**/dbnavigator.xml
29+
30+
# Gradle
31+
.idea/**/gradle.xml
32+
.idea/**/libraries
33+
.idea/**
34+
35+
# Gradle and Maven with auto-import
36+
# When using Gradle or Maven with auto-import, you should exclude module files,
37+
# since they will be recreated, and may cause churn. Uncomment if using
38+
# auto-import.
39+
# .idea/modules.xml
40+
# .idea/*.iml
41+
# .idea/modules
42+
# *.iml
43+
# *.ipr
44+
45+
# CMake
46+
cmake-build-*/
47+
48+
# Mongo Explorer plugin
49+
.idea/**/mongoSettings.xml
50+
51+
# File-based project format
52+
*.iws
53+
54+
# IntelliJ
55+
out/
56+
57+
# mpeltonen/sbt-idea plugin
58+
.idea_modules/
59+
60+
# JIRA plugin
61+
atlassian-ide-plugin.xml
62+
63+
# Cursive Clojure plugin
64+
.idea/replstate.xml
65+
66+
# Crashlytics plugin (for Android Studio and IntelliJ)
67+
com_crashlytics_export_strings.xml
68+
crashlytics.properties
69+
crashlytics-build.properties
70+
fabric.properties
71+
72+
# Editor-based Rest Client
73+
.idea/httpRequests
74+
75+
# Android studio 3.1+ serialized cache file
76+
.idea/caches/build_file_checksums.ser
77+
78+
79+
# VisualStudioCode
80+
.vscode/*
81+
!.vscode/settings.json
82+
!.vscode/tasks.json
83+
!.vscode/launch.json
84+
!.vscode/extensions.json
85+
*.code-workspace
86+
87+
# Byte-compiled / optimized / DLL files
88+
__pycache__/
89+
*.py[cod]
90+
*$py.class
91+
92+
# C extensions
93+
*.so
94+
95+
# Distribution / packaging
96+
.Python
97+
build/
98+
develop-eggs/
99+
dist/
100+
downloads/
101+
eggs/
102+
.eggs/
103+
lib/
104+
lib64/
105+
parts/
106+
sdist/
107+
var/
108+
wheels/
109+
pip-wheel-metadata/
110+
share/python-wheels/
111+
*.egg-info/
112+
.installed.cfg
113+
*.egg
114+
MANIFEST
115+
116+
# PyInstaller
117+
# Usually these files are written by a python script from a template
118+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
119+
*.manifest
120+
*.spec
121+
122+
# Installer logs
123+
pip-log.txt
124+
pip-delete-this-directory.txt
125+
126+
# Unit test / coverage reports
127+
htmlcov/
128+
.tox/
129+
.nox/
130+
.coverage
131+
.coverage.*
132+
.cache
133+
nosetests.xml
134+
coverage.xml
135+
*.cover
136+
*.py,cover
137+
.hypothesis/
138+
.pytest_cache/
139+
140+
# Translations
141+
*.mo
142+
*.pot
143+
144+
# Django stuff:
145+
*.log
146+
local_settings.py
147+
db.sqlite3
148+
db.sqlite3-journal
149+
150+
# Flask stuff:
151+
instance/
152+
.webassets-cache
153+
154+
# Scrapy stuff:
155+
.scrapy
156+
157+
# Sphinx documentation
158+
docs/_build/
159+
160+
# PyBuilder
161+
target/
162+
163+
# Jupyter Notebook
164+
.ipynb_checkpoints
165+
166+
# IPython
167+
profile_default/
168+
ipython_config.py
169+
170+
# pyenv
171+
.python-version
172+
173+
# pipenv
174+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
175+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
176+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
177+
# install all needed dependencies.
178+
#Pipfile.lock
179+
180+
# celery beat schedule file
181+
celerybeat-schedule
182+
183+
# SageMath parsed files
184+
*.sage.py
185+
186+
# Environments
187+
.env
188+
.venv
189+
env/
190+
venv/
191+
ENV/
192+
env.bak/
193+
venv.bak/
194+
195+
# Spyder project settings
196+
.spyderproject
197+
.spyproject
198+
199+
# Rope project settings
200+
.ropeproject
201+
202+
# mkdocs documentation
203+
/site
204+
205+
# mypy
206+
.mypy_cache/
207+
.dmypy.json
208+
dmypy.json
209+
210+
# Pyre type checker
211+
.pyre/
212+
213+
# Mac
214+
*.DS_Store

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Graph Database Benchmark : Neo4j vs Amazon Neptune vs Titan vs TigerGraph vs JanusGraph vs Arangodb
1+
# Graph Database Benchmark
2+
This repo contains code for benchmarking Graph databases.
23

34
- same datasets
45
- same query workload
@@ -7,6 +8,15 @@ Graph Database Benchmark : Neo4j vs Amazon Neptune vs Titan vs TigerGraph vs Jan
78
- each vendor's benchmark is under
89
/benchmark/vendor_name/
910
- start with README under each folder
10-
- all test can be reproducible on EC2 or similar enviroment.
1111

1212
Contact: benchmark@tigergraph.com
13+
14+
Current databases supported:
15+
16+
+ Amazon Neptune [(benchmark folder)](benchmark/neptune/)
17+
+ Arangodb [(benchmark folder)](benchmark/arangodb/)
18+
+ JanusGraph [(benchmark folder)](benchmark/janusgraph/)
19+
+ Neo4j [(benchmark folder)](benchmark/neo4j/)
20+
+ RedisGraph [(benchmark folder)](benchmark/redisgraph/)
21+
+ TigerGraph [(benchmark folder)](benchmark/tigergraph/)
22+

benchmark/redisgraph/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
data/**
2+
results_redisgraph/**

benchmark/redisgraph/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM python:2.7.10
2+
3+
COPY scripts ./scripts
4+
COPY bulk_insert.py ./
5+
COPY config.py ./
6+
COPY generate_graph500_inputs.py ./
7+
COPY generate_twitter_inputs.py ./
8+
COPY graph_query.py ./
9+
COPY kn.py ./
10+
COPY query_runner.py ./
11+
COPY requirements.txt ./
12+
COPY docker_entrypoint.sh ./
13+
14+
#RUN ./scripts/retrieve_seed_and_unique_node_data_from_s3.sh
15+
16+
RUN python -m pip install -r requirements.txt
17+
18+
19+
RUN chmod -R 751 scripts
20+
RUN chmod 751 docker_entrypoint.sh
21+
ENTRYPOINT ["./docker_entrypoint.sh"]

benchmark/redisgraph/Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Go parameters
2+
# DOCKER
3+
DOCKER_APP_NAME=graph-database-benchmark-redisgraph
4+
DOCKER_ORG=redisbench
5+
DOCKER_REPO:=${DOCKER_ORG}/${DOCKER_APP_NAME}
6+
#DOCKER_TAG:=$(shell git log -1 --pretty=format:"%h")
7+
DOCKER_TAG=edge
8+
DOCKER_IMG:="$(DOCKER_REPO):$(DOCKER_TAG)"
9+
DOCKER_LATEST:="${DOCKER_REPO}:latest"
10+
11+
# DOCKER TASKS
12+
# Build the container
13+
docker-build:
14+
docker build -t $(DOCKER_APP_NAME):latest -f Dockerfile .
15+
16+
# Build the container without caching
17+
docker-build-nc:
18+
docker build --no-cache -t $(DOCKER_APP_NAME):latest -f Dockerfile .
19+
20+
# Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
21+
docker-release: docker-build-nc docker-publish
22+
23+
# Docker publish
24+
docker-publish: docker-publish-latest docker-publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
25+
26+
docker-repo-login: ## login to DockerHub with credentials found in env
27+
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
28+
29+
docker-publish-latest: docker-tag-latest ## Publish the `latest` tagged container to ECR
30+
@echo 'publish latest to $(DOCKER_REPO)'
31+
docker push $(DOCKER_LATEST)
32+
33+
docker-publish-version: docker-tag-version ## Publish the `{version}` tagged container to ECR
34+
@echo 'publish $(DOCKER_IMG) to $(DOCKER_REPO)'
35+
docker push $(DOCKER_IMG)
36+
37+
# Docker tagging
38+
docker-tag: docker-tag-latest docker-tag-version ## Generate container tags for the `{version}` ans `latest` tags
39+
40+
docker-tag-latest: ## Generate container `{version}` tag
41+
@echo 'create tag latest'
42+
docker tag $(DOCKER_APP_NAME) $(DOCKER_LATEST)
43+
44+
docker-tag-version: ## Generate container `latest` tag
45+
@echo 'create tag $(DOCKER_APP_NAME) $(DOCKER_REPO):$(DOCKER_IMG)'
46+
docker tag $(DOCKER_APP_NAME) $(DOCKER_IMG)

0 commit comments

Comments
 (0)