|
CSet++
Set of defined functions to work with sets
|
This is the main benchmark file of the cset library. It contains all the benchmarks needed to test the library's performance. More...
#include <iostream>#include <string>#include <vector>#include <chrono>#include <thread>#include <functional>#include <mutex>#include "set.h"
Include dependency graph for set.cpp:Go to the source code of this file.
Functions | |
| void | print (std::string msg) |
| Manages the std::cout resource between simultaneously running threads. | |
| void | benchmark (std::string name, std::function< void()> function, int n) |
| Manages the benchmarking of a passed function. | |
| int | main () |
| Main entry point that runs a benchmark for every library method. | |
Variables | |
| std::mutex | out |
| The std::mutex object that locks the std::cout resource. | |
This is the main benchmark file of the cset library. It contains all the benchmarks needed to test the library's performance.
This file contains some functions that run benchmarks on different threads.
Each function gets executed a thousand times and then the execution time gets printed to the console.
Definition in file set.cpp.
| void benchmark | ( | std::string | name, |
| std::function< void()> | function, | ||
| int | n | ||
| ) |
| int main | ( | ) |
Main entry point that runs a benchmark for every library method.
Definition at line 63 of file set.cpp.
References benchmark(), set::contains(), set::count(), set::diff(), set::intersection(), set::reverse(), set::rsort(), set::sdiff(), set::sort(), set::sunion(), and set::unique().
| void print | ( | std::string | msg | ) |