gMark is a domain- and query language-independent graph instance and query workload generator. The original version of gMark is available on GitHub at gbagan/gmark. The version of gMark in this repository has as goal to rewrite gMark such that it is easier to extend and has better documented code. Currently the focus of the rewrite is on query generation, but the end goal is full feature parity with the original version of gMark. The rewrite has not reached that point yet and is notably still missing graph generation, RPQ (regular path query) based queries and several output formats. However, the current version does also offer some features not present in the original version of gMark, such as the ability to generate CPQ (conjunctive path query) based queries, various utilities for working with CPQs, and a graphical user interface for the program.
Documentation (javadoc) can be found at: gmark.docs.roanh.dev more details on gMark itself can be found in the technical report arxiv.org/abs/1511.08386. Details regarding the aforementioned queries containing CPQs can be found in my report titled Conjunctive Path Query Generation for Benchmarking.
To support a wide variety of of use cases gMark is a available in a number of different formats.
- As a standalone executable with both a graphical and command line interface
- As a docker image
- As a maven artifact
When using gMark on the command line the following arguments are supported:
usage: gmark [-c <file>] [-f] [-g <size>] [-h] [-o <folder>] [-s <syntax>] [-w <file>]
-c,--config <file> The workload and graph configuration file
-f,--force Overwrite existing files if present
-g,--graph <size> Triggers graph generation, a graph size can be provided (overrides the ones
set in the configuration file)
-h,--help Prints this help text
-o,--output <folder> The folder to write the generated output to
-s,--syntax <syntax> The concrete syntax(es) to output
-w,--workload <file> Triggers workload generation, a previously generated input workload can
optionally be provided to generate concrete syntaxes for instead
For example, a workload of queries in SQL format can be generated using:
gmark -c config.xml -o ./output -s sql -w
An example configuration XML file can be found both in this repository and in the graphical interface of the standalone executable. The example RPQ workload configuration files included in the original gMark repository are also compatible and can be found in the use-cases folder.
gMark is available as a standalone portable executable that has both a graphical interface and a command line interface. The graphical interface will only be launched when no command line arguments are passed. This version of gMark requires Java 17 or higher to run.
All releases: releases
GitHub repository: RoanH/gMark
The following commands show how to generate a workload of queries in SQL format using the standalone executable.
./gMark.exe -c config.xml -o ./output -s sql -w
java -jar gMark.jar -c config.xml -o ./output -s sql -w
gMark is available as a docker image on Docker Hub. This means that you can obtain the image using the following command:
docker pull roanh/gmark:latest
Using the image then works much the same as the regular command line version of gMark. For example, we can generate the example workload of queries in SQL format using the following command:
docker run --rm -v "$PWD/data:/data" roanh/gmark:latest -c /data/config.xml -o /data/queries -s sql -w
Note that we mount a local folder called data
into the container to pass our configuration file and to retrieve the generated queries.
gMark is available on Maven central as an artifact so it can be included directly in another Java project using Gradle or Maven. This way it becomes possible to directly use all the implemented constructs and utilities. A hosted version of the javadoc for gMark can be found at gmark.docs.roanh.dev.
repositories{
mavenCentral()
}
dependencies{
implementation 'dev.roanh.gmark:gmark:1.2'
}
<dependency>
<groupId>dev.roanh.gmark</groupId>
<artifactId>gmark</artifactId>
<version>1.2</version>
</dependency>
This repository contain an Eclipse & Gradle project with Util and Apache Commons CLI as the only dependencies. Development work can be done using the Eclipse IDE or using any other Gradle compatible IDE. Continuous integration will check that all source files use Unix style line endings (LF) and that all functions and fields have valid documentation. Unit testing is employed to test core functionality, CI will also check for regressions using these tests. A hosted version of the javadoc for gMark can be found at gmark.docs.roanh.dev. Compiling the runnable Java archive (JAR) release of gMark using Gradle can be done using the following command in the gMark
directory:
./gradlew client:shadowJar
After which the generated JAR can be found in the build/libs
directory. On windows ./gradlew.bat
should be used instead of ./gradlew
.
Project development started: 25th of September, 2021.