This repository contains a solution to a coding challenge. The problem description can be found at problem.md. You can find a report on the progress of the project at report.md.
To build the project, execute the following commands in your terminal:
mkdir build
cd build
cmake ..
cmake --build .
This project has a number of dependencies on other libraries, but you do not have to install them manually. If previously installed, they will be used, otherwise CMake will try to automatically fetch and compile them for you (via FetchContent
), so you do not have to install anything.
Here are the libraries used in this project:
- GoogleTest: Used for unit testing
- eventpp: A production-ready event handling library
- TBB: Used for
concurrent_unordered_map
- concurrentqueue: Used as a lock-free queue provider
- benchmark: Used to implement benchmarks
A C++20 compiler is required to compile this project, as it utilizes C++20 features such as concepts.
This program was tested with CMake version 3.28.3
and Clang version 18.1.8
on Ubuntu 24.04 operating system.
This program creates several executables. You can run them as follows:
EventTree
is a demo program simulating a solution to the problem. You can run it with the following command:
./EventTree
Testcases to test SpecialEventQueue
, the implemented event queue library, can be executed with this command:
./SpecialQueueTest
There are 3 benchmarks in this project. You can run them with:
./BmDispatch
./BmEnqueue
./BmFairness
clang-tidy
is used as the static analysis tool. You can run it by using this command:
cmake --build . --target tidy
clang-format
is used as the formatter in this project. The project is configured to invoke this program every time you issue a build command, so there's no need to call it explicitly.