Benchmark tests for various graph databases.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cayley
data
dgraph minor code improvement Jan 5, 2017
.gitattributes
.gitignore
LICENSE Initial commit Dec 27, 2016
README.md
main.go added flags to select which type of benchmarking to perform Jan 5, 2017

README.md

graphdb-benchmarks

Benchmark tests for various graph databases.

Results of first LoadData benchmark tests.

Loading 30kmoviedata provided in cayley examples folder

  1. Loading data in cayley graph with bolt backend.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=cayley
Starting benchmark tests for cayley.
==> Executing: go test ./cayley/ -bench=.
==> Output: testing: warning: no tests to run
==> Executing: cayley init -db=bolt -dbpath=cayleydb -quads=../data/30kmoviedata.nq.gz
BenchmarkImportDataToDB-4   	       1	30028388985 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/cayley	30.035s
  1. Loading data in dgraph.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=dgraph
Starting benchmark tests for dgraph.
==> Executing: go test ./dgraph/ -bench=.
==> Output: testing: warning: no tests to run
==> Executing: dgraphloader -r=../data/30kmoviedata.nq.gz
==> Output:
Processing ../data/30kmoviedata.nq.gz
Number of mutations run   : 472ne:   471705 RDFs per second:  124927
Number of RDFs processed  : 471705
Time spent                : 4.715085371s
RDFs processed per second : 117926
BenchmarkImportDataToDB-4   	       1	4738905881 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/dgraph	4.745s

Loading 21million.rdf.gz data

  1. Loading data in cayley graph with bolt backend.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=cayley
Starting benchmark tests for cayley.
==> Executing: go test -timeout=5h ./cayley/ -bench=.
==> Output: testing: warning: no tests to run
==> Executing: cayley init -db=bolt -dbpath=cayleydb -quads=../data/21million.rdf.gz
BenchmarkImportDataToDB-4   	       1	8527419635659 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/cayley	8527.427s
  1. Loading data in dgraph.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=dgraph
Starting benchmark tests for dgraph.
==> Executing: go test -timeout=5h ./dgraph/ -bench=.
==> Output: testing: warning: no tests to run
==> Executing: dgraphloader -r=../data/21million.rdf.gz
==> Output:
Processing ../data/21million.rdf.gz
Number of mutations run   : 21240: 21239872 RDFs per second:   24229
Number of RDFs processed  : 21239872
Time spent                : 14m39.848819629s
RDFs processed per second : 24163
BenchmarkImportDataToDB-4   	       1	879903054838 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/dgraph	879.913s

Results of Queries benchmark.

####(Dgraph queries were performed in GraphQL+- and Cayley were performed in gremlin).

Query to find all movies and their genre which are directed by director "Steven Spielberg".

  1. Querying in cayley graph with bolt backend.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=cayley -bench=queries
Starting benchmark tests for cayley.
Starting queries benchmarking tests.
==> Executing: go test -timeout 4h ./cayley/ -bench BenchmarkQuery*
==> Output: testing: warning: no tests to run
BenchmarkQueryFilmByDirector-4   	      20	  64747834 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/cayley	1.376s
  1. Querying in dgraph.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=dgraph -bench=queries
Starting benchmark tests for dgraph.
Starting queries benchmarking tests.
==> Executing: go test -timeout 4h ./dgraph/ -bench BenchmarkQuery*
==> Output: testing: warning: no tests to run
BenchmarkQueryFilmByDirector-4   	    1000	   1764900 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/dgraph	2.067s

Results of Queries benchmark.

####(Dgraph queries were performed in GraphQL+- and Cayley were performed in MQL).

Query to find all movies and their genre which are directed by director "Steven Spielberg".

  1. Querying in cayley graph with bolt backend.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=cayley -bench=queries
Starting benchmark tests for cayley.
Starting queries benchmarking tests.
==> Executing: go test -timeout 4h ./cayley/ -bench BenchmarkQuery*
==> Output: testing: warning: no tests to run
BenchmarkQueryFilmByDirector_WithNodeIDGiven-4   	     300	   5266758 ns/op
BenchmarkQueryFilmByDirector_WithNameGiven-4     	     300	   4612812 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/cayley	4.027s
  1. Querying in dgraph.
Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=dgraph -bench=queries
Starting benchmark tests for dgraph.
Starting queries benchmarking tests.
==> Executing: go test -timeout 4h ./dgraph/ -bench BenchmarkQuery*
==> Output: testing: warning: no tests to run
BenchmarkQueryFilmByDirector_WithNodeIDGiven-4   	    2000	    891509 ns/op
BenchmarkQueryFilmByDirector_WithNameGiven-4     	    2000	   1137399 ns/op
PASS
ok  	_/Users/ankuryadav/dev/benchmark/graphdb-benchmark/dgraph	4.639s

Ankurs-MacBook-Pro:graphdb-benchmark ankur$ go run main.go -db=cayley -bench=queries

Note : MQL queries for cayley are present in cayleyMQL branch. Note : Please ensure you have Git LFS installed, before you clone this repository.