de.uni.leipzig.IR15.Benchmark.dex
Class DEXBenchmark

java.lang.Object
  extended by de.uni.leipzig.IR15.Benchmark.Benchmark
      extended by de.uni.leipzig.IR15.Benchmark.dex.DEXBenchmark
Direct Known Subclasses:
Query1_Benchmark, Query2_Benchmark, Query3_Benchmark

public abstract class DEXBenchmark
extends Benchmark

Abstract Base Class for all benchmarks running on DEX graph database. It holds a reference to the database, the session and the graph, it also cares about generating random (and existing) node ids.

Author:
Robert 'robbl' Schulze

Constructor Summary
DEXBenchmark()
           
 
Method Summary
 void afterRun()
          Commit the session after each run.
 void beforeRun()
          Get a new random node before each run.
 int findMaxWordID()
          Find the maximal word id.
 long getRandomNode(int outDegree)
          Get a random node with a minimum degree as threshold.
 void setUp()
          Setup the database connection and find all needed node, edge and attribute types.
 void tearDown()
          Cleanup after benchmarking.
 void warmup()
          This method is called once before the benchmark starts
 
Methods inherited from class de.uni.leipzig.IR15.Benchmark.Benchmark
getCurrentRun, getName, getResults, getRuns, run, setCurrentRun, setRuns
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DEXBenchmark

public DEXBenchmark()
Method Detail

setUp

public void setUp()
Setup the database connection and find all needed node, edge and attribute types.

Specified by:
setUp in class Benchmark

beforeRun

public void beforeRun()
Get a new random node before each run.

Specified by:
beforeRun in class Benchmark

afterRun

public void afterRun()
Commit the session after each run.

Specified by:
afterRun in class Benchmark

findMaxWordID

public int findMaxWordID()
Find the maximal word id.

Returns:
maximal word id

getRandomNode

public long getRandomNode(int outDegree)
Get a random node with a minimum degree as threshold.

Parameters:
outDegree -
Returns:
random node id

tearDown

public void tearDown()
Cleanup after benchmarking.

Specified by:
tearDown in class Benchmark

warmup

public void warmup()
Description copied from class: Benchmark
This method is called once before the benchmark starts

Specified by:
warmup in class Benchmark