Skip to content

DorosMichal/KomfyDB

Repository files navigation

KomfyDB

Toy relational database C++ implementation based on MIT's SimpleDB.

Cloning

Run:

git clone --recursive https://github.com/DorosMichal/KomfyDB

Requirements

  • clang-13
  • bazel
  • openjdk-11-jdk

On Debian Bullseye:

sudo apt update && sudo apt install clang-13 bazel openjdk-11-jdk

Using bazel

I highly encourage you to take a look on this tutorial as it's really short and shows almost everything we need here.

First run:

source ./env.sh

To see if bazel is working run (anywhere in the source tree!):

bazel run //komfydb:komfydb -- --logtostderr=1

To cleanup simply run

bazel clean --expunge

Debugging

Build the project by running:

bazel build --config=debug //...

Then, to debug run gdb on the target, e.g. to debug //komfydb:komfydb:

gdb bazel-bin/komfydb/komfydb

Profiling

Build the project with these additional options:

bazel build --copt=-pg --cxxopt=-pg --linkopt=-pg //...

Then run

bazel-bin/komfydb/komfydb
gprof bazel-bin/komfydb/komfydb > komfydb.prof

About

The best database we've ever made

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published