cd benchmarks && python3 generate_alloc_file.py && cd ..
- to include allocation benchmarks (optional)mkdir build && cd build && cmake .. && make
- to build the projectmake install
- to install the librariesmake test
- runs the tests of the project (this assumes that the project is built)pip install -r ./requirements.txt
will install all the dependencies of all python scripts
This is used to plot the different outputs of the executables from
benchmarks/elapsed_time/
.
Usage (make sure you build the project first):
python3 plot_elapsed_time.py -h
to see the help menu
Examples:
python3 plot_elapsed_time.py -b ./build/benchmarks/elapsed_time/bench_random -n 100000
Explanation (can also be found in the help menu of the script):
./build/benchmarks/elapsed_time/bench_random
- the executable that we want to execute100000
- the upperbound of objects that will be created (in the case ofbench_worst
, the upperbound is multiplied by the size of the pool)
This is used to plot the output of the command:
valgrind --tool=massif --stacks=yes --time-unit=ms
on all the executables from benchmarks/memory_usage/
.
Usage (make sure you build the project first):
python3 plot_memory_usage.py -h
to see the help menu
This is a script which is used to run an executable with a custom new/delete
implementation. The custom new/delete library implements these operators by
using the linked_pool/NSGlobalLinkedPool
class to (de)allocate small objects and
malloc
to (de)allocate large objects.
Usage (make sure libcustomnew.so
is installed):
inject_custom_new my_exec args1 args2
- to run your executable with the custom implementation that is also thread safe
This is a script that will generate allocation benchmarks. By running this
script, the CMakeLists.txt
file will change and next time make
is called,
the benchmarks will be compiled.
Note: Make sure you run this script from the benchmarks
folder.
This is a script which is used to run all the allocation benchmarks.
Usage:
python3 time_alloc_benchmarks.py -h
for instructions.
Note: Make sure generate_alloc_file.py
was run and the project was built.
Everything is GPLv3 except for the following files which have their own license:
include/rpools/tools/light_lock.h
(check source)src/avltree/avltree.c
(check source)include/rpools/avltree/avltree.h
(check source)src/allocators/MemoryPool.h
(MIT)