Giter Club home page Giter Club logo

splinter's Introduction

Introduction

A simple automated graph stress test tool based on the Pilot graph operator, utilizing the Tinkerpop stack โ€” i.e. Blueprints, Gremlin, Pipes. You can use it to:

  • quickly generate random graphs of whatever configuration you want (you can specify number of vertices and level of connectivity)
  • benchmark different graph database providers on some defined metrics
  • automate sets of tests to be run on any number of graphs

To Use:

For Maven Users

After downloading the project, just:

$ mvn clean install
$ mvn exec:java -Dexec.args="sampletestdefinition.xml"

In the above command, any test definition XML file may be used in place of the example sampletestdefinition.xml file provided.

Non-Maven

Dependencies

Make sure you have Pilot, the Tinkerpop libraries, and your favorite graph database already in your system CLASSPATH.

Running

Copy the sources in src/main/groovy/com/countvajhula/splinter/ to a desired location and cd into that directory. Then:

$ groovyc *.groovy
$ ./Splinter.groovy <testdefinitionfile.xml>

As an example, the provided sampletestdefinition.xml file may be used in the above command.

Test Definition

The test definition file is pretty straightforward XML (see sampletestdefinition.xml for a comprehensive example) like so:

<sampletestdefinition>
	<graphs>
		<graph type="tinkergraph" overwrite="no">
			<vertices>100</vertices>
			<connectivity>
				<function>linear</function>
				<arg>0.2</arg>
			</connectivity>
		</graph>
		<!-- add more graphs here if you want to get crazy -->
	</graphs>
	<tests>
		<test name="getEdgesBetweenVertices">
			<times>100</times>
		</test>
		<test name="getNeighbors">
			<times>100</times>
		</test>
		<!-- these are the only pre-loaded metrics. You can add your own fairly easily by modifying the file TestMetrics.groovy, if you want to get crazy -->
	</tests>
</sampletestdefinition>

Example output:

$./GraphStressTester.groovy sampletestdefinition.xml
...
TinkerGraph graph initialized.
Graph empty or overwrite set to true. Recreating graph.
Running getNeighbors...
profiler results:
------PROFILER RESULTS (tinkergraph_100vertices_linear0.2connxns--getneighbors) ------
Total Duration = 152.004 ms
getNeighbors:	149.073 ms	98.07176127 %
getVertex:	1.988 ms	1.30786032 %
hashCode:	0.595 ms	0.39143707 %
equals:	0.348 ms	0.22894134 %
super$2$getElementProperty:	0.0 ms	0.0 %
$createCallSiteArray:	0.0 ms	0.0 %
super$2$getAllEdges:	0.0 ms	0.0 %
super$2$removeEdge:	0.0 ms	0.0 %
super$2$this$dist$set$2:	0.0 ms	0.0 %
... etc.
------xxxxxxxxxxxxxxxx (tinkergraph_100vertices_linear0.2connxns--getneighbors) ------

splinter's People

Contributors

countvajhula avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.