# Setup

This benchmark is build on the original benchmark for riak core called [basho\_bench](https://github.com/basho/basho_bench). Additional documentation on basho\_bench can be found at [basho\_bench\_documentation](https://docs.riak.com/riak/kv/latest/using/performance/benchmarking).

A benchmark setup for antidote might look as follows:

![](/files/-LvexYAly6rlYLu3jQsm)

## Prerequisites

* erlang (for example with [kerl](https://github.com/kerl/kerl))
* make
* git
* [r statistics language](https://www.r-project.org), to generate graphs

## Compile

For compiling from source code, clone the repository and use the make command.

* git clone <https://github.com/AntidoteDB/Benchmarks>
* cd Benchmarks
* make

The compiled basho\_bench script is found at the path inside the Benchmark directory:

* \_build/default/bin/basho\_bench

## Setup Antidote

Before you can run a benchmark you have to set up an Antidote cluster, or have access to an existing Antidote cluster.\
More information on how to deploy Antidote can be found at [AntidoteDB-documentation/deployment](https://github.com/AntidoteDB/AntidoteDB-documentation/tree/master/deployment).

## Usage

You may use the

* `make runbench`&#x20;

command, which will use the default results directory, which is the '/tests/' directory inside the repository. If it does not exist it will be created automatically.

If you want to specify your own result directory and/or configuration file, edit the command as follows:

* `basho_bench --result-dir <results dir> <config file>`

## Results Directory

The defined results directory contains of benchmarking result folders, that are named as time stamps with the following format:

* `YYYYMMDD_HHMMSS`, for example 20190702\_091011

or

* `current`, which is a link to the newest generated result directory

This time stamped directories contain:

* the used configuration file: e.g. antidote\_pb.config
* logs for different log-level
* csv files (one summary.csv and maybe several \*\_latency.csv), which contain the collected data

## Generate Graphs

It is possible to make graphes out of generated csv files.

You can do this by using the following make commands:

* `make results`, which will build the summary graph for the current benchmarking result
* `make all_results`, to build the summary graphs of all benchmarking results contained in the results directory

You can also make these graphs outside of the repository. You only need the '/priv/' folder, as well as the folder containing the results (csv files):

* `Rscript --vanilla <priv/summary.r> -i <results-directory>`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://antidotedb.gitbook.io/documentation/benchmarking/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
