https://github.com/tarantool/cbench
Tarantool C Bench - a simple tool to benchmark Tarantool internal API
https://github.com/tarantool/cbench
Last synced: about 1 year ago
JSON representation
Tarantool C Bench - a simple tool to benchmark Tarantool internal API
- Host: GitHub
- URL: https://github.com/tarantool/cbench
- Owner: tarantool
- License: bsd-2-clause
- Created: 2013-10-17T09:02:16.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-04-05T19:26:16.000Z (about 4 years ago)
- Last Synced: 2025-04-14T15:12:52.529Z (about 1 year ago)
- Language: Lua
- Size: 46.9 KB
- Stars: 3
- Watchers: 38
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tarantool C Bench
=================
## Overview
Tarantool C Bench is a **simple tool to benchmark Tarantool internal API**. Tarantool (http://tarantool.org) is an efficient in-memory NoSQL database and a Lua application server, blended.
The tool is used internally by Tarantool team to check for performance regressions during development cycle. All workloads are written in C++. Lua (FFI) is only used to load & run workloads and display results (does not affect performance).
[](https://travis-ci.org/tarantool/cbench)
## Prerequisites
* Tarantool 1.6.5+ with header files (tarantool && tarantool-dev packages)
* libmsgpuck header files (libmsgpuck-dev package)
## Installation
Clone repository and then build it using CMake:
``` bash
git clone https://github.com/tarantool/cbench.git tarantool-cbench
cd tarantool-cbench && cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo
make
make install
```
## Usage
Modify workload configuration in bench-cfg.lua and run it:
$ ./bench-cfg.lua
Results are printed to the console and `tarantool.log`:
```
2013-10-17 11:55:38.277 [26385] 101/init.lua I> ----------------------------------
2013-10-17 11:55:39.309 [26385] 101/init.lua I> HASH NUM
2013-10-17 11:55:39.309 [26385] 101/init.lua I> ----------------------------------
2013-10-17 11:55:39.309 [26385] 101/init.lua I> replaces : 1706523.16 rps
2013-10-17 11:55:39.309 [26385] 101/init.lua I> selects : 2102669.76 rps
2013-10-17 11:55:39.309 [26385] 101/init.lua I> deletes : 1690311.04 rps
2013-10-17 11:55:39.309 [26385] 101/init.lua I> ----------------------------------
2013-10-17 11:55:41.933 [26385] 101/init.lua I> HASH STR
2013-10-17 11:55:41.933 [26385] 101/init.lua I> ----------------------------------
2013-10-17 11:55:41.933 [26385] 101/init.lua I> replaces : 1250570.18 rps
2013-10-17 11:55:41.933 [26385] 101/init.lua I> selects : 1528495.59 rps
2013-10-17 11:55:41.933 [26385] 101/init.lua I> deletes : 1150491.84 rps
2013-10-17 11:55:41.933 [26385] 101/init.lua I> ----------------------------------
2013-10-17 11:56:33.537 [26385] 101/init.lua I> Benchmark result saved to bench-result-1.6.0-203-ge116619-Linux-x86_64-Debug.json
```
A provided script also saves results in JSON format into a file in the current directory:
~/tarantool/test/var $ cat *.json
[["HASH NUM",[["replaces",1706523.160216],["selects",2102669.7558844],["deletes",1690311.0366006]]],["HASH STR",[["replaces",1250570.1797105],["selects",1528495.5941411],["deletes",1150491.8403015]]]]
## Feedback
Please report bugs at http://github.com/tarantool/tarantool/issues We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com.
Thank you for your interest in Tarantool!
## Microb integration
To interact with microbench service follow next steps:
* Get api token from tarantool dev team
* Add token into your build infrastructure
* run `cbench_runner.lua`:
```
tarantool cbench_runner.lua
```
* Result: you can see cbench in microb dashboard
N.B.: tarantool-http module required for microb integration