Skip to content

Development Adding a Database

Nate edited this page Oct 9, 2019 · 1 revision

You can think of each database folder as a "plugin". The steps to add a new database to TFB should look something like this, using redis as an example:

  • Create the folder toolset/databases/redis
  • Create redis.dockerfile in that folder. The dockerfile should install the database, build the worlds and fortunes table, and run the database.
  • Create a redis.py file. In it should be a Database class that implements get_current_world_table() and test_connection() static methods.
  • If python database drivers are needed for your new database, add them to the root toolset dockerfile here so that they're available in your python file: https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/Dockerfile#L16

The name of the folder, the dockerfile, and the python file with the Database class should all be the name of the database. Framework tests can now use the new database in the "database" field in their benchmark_config.json. In this example, "database": "redis".

When submitting a new database, please keep the following in mind:

  • The database should be actively maintained.
  • The database should be production ready. (Unlike framework tests, please do not submit pet projects or multiple variations of the same database.)
  • The database should have licencing that allows use in benchmarking projects such as ours.
  • The database's API should allow test maintainers to implement all current database tests.
Clone this wiki locally