jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Functions | Variables
test_hashset_perf01.cpp File Reference
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <random>
#include <vector>
#include <unordered_set>
#include <jau/test/catch2_ext.hpp>
#include "test_datatype01.hpp"
#include <jau/basic_types.hpp>
#include <jau/basic_algos.hpp>
#include <jau/counting_allocator.hpp>
#include <jau/callocator.hpp>
#include <jau/counting_callocator.hpp>
#include <jau/darray.hpp>
#include <jau/cow_darray.hpp>
#include <jau/cow_vector.hpp>
Include dependency graph for test_hashset_perf01.cpp:

Go to the source code of this file.

Functions

static bool benchmark_fillunique_find_hash (const std::string &title_pre, const std::string &type_id, const bool do_rserv)
 
template<class T , typename Size_type >
static bool benchmark_fillunique_find_itr (const std::string &title_pre, const std::string &type_id, const bool do_rserv)
 
template<class T >
const DataType01findDataSet01_hash (T &data, DataType01 const &elem) noexcept
 
static bool footprint_fillseq_list_hash (const std::string &type_id, const bool do_rserv)
 
template<class T , typename Size_type >
static bool footprint_fillseq_list_itr (const std::string &type_id, const bool do_rserv)
 
template<class T >
static std::size_t get_capacity (const T &data)
 
template<class T >
static void print_mem (const std::string &pre, const T &data)
 
template<class T >
static int test_00_list_itr (T &data)
 
template<class T , typename Size_type >
static void test_00_seq_fill (T &data, const Size_type size)
 
template<class T >
static void test_00_seq_fill_unique_hash (T &data, const std::size_t size)
 
template<class T , typename Size_type >
static void test_00_seq_fill_unique_itr (T &data, const Size_type size)
 
template<class T >
static void test_00_seq_find_hash (T &data)
 
template<class T , typename Size_type >
static void test_00_seq_find_itr (T &data)
 
static bool test_01_seq_fill_list_hash (const std::string &type_id, const std::size_t size0, const std::size_t reserve0, const bool do_print_mem)
 
template<class T , typename Size_type >
static bool test_01_seq_fill_list_itr (const std::string &type_id, const Size_type size0, const Size_type reserve0, const bool do_print_mem)
 
static bool test_02_seq_fillunique_find_hash (const std::string &type_id, const std::size_t size0, const std::size_t reserve0)
 
template<class T , typename Size_type >
static bool test_02_seq_fillunique_find_itr (const std::string &type_id, const Size_type size0, const Size_type reserve0)
 
 TEST_CASE ("Memory Footprint 01 - Fill Sequential and List", "[datatype][footprint]")
 
 TEST_CASE ("Perf Test 02 - Fill Unique and List, empty and reserve", "[datatype][unique]")
 

Variables

static Addr48Bit start_addr (start_addr_b)
 
static uint8_t start_addr_b [] = {0x20, 0x26, 0x2A, 0x01, 0x20, 0x10}
 

Function Documentation

◆ findDataSet01_hash()

template<class T >
const DataType01 * findDataSet01_hash ( T &  data,
DataType01 const &  elem 
)
noexcept

Definition at line 50 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ test_00_list_itr()

template<class T >
static int test_00_list_itr ( T &  data)
static

Definition at line 59 of file test_hashset_perf01.cpp.

◆ test_00_seq_find_itr()

template<class T , typename Size_type >
static void test_00_seq_find_itr ( T &  data)
static

Definition at line 69 of file test_hashset_perf01.cpp.

◆ test_00_seq_find_hash()

template<class T >
static void test_00_seq_find_hash ( T &  data)
static

Definition at line 86 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ test_00_seq_fill()

template<class T , typename Size_type >
static void test_00_seq_fill ( T &  data,
const Size_type  size 
)
static

Definition at line 103 of file test_hashset_perf01.cpp.

◆ test_00_seq_fill_unique_itr()

template<class T , typename Size_type >
static void test_00_seq_fill_unique_itr ( T &  data,
const Size_type  size 
)
static

Definition at line 114 of file test_hashset_perf01.cpp.

◆ test_00_seq_fill_unique_hash()

template<class T >
static void test_00_seq_fill_unique_hash ( T &  data,
const std::size_t  size 
)
static

Definition at line 131 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ print_mem()

template<class T >
static void print_mem ( const std::string &  pre,
const T &  data 
)
static

Definition at line 145 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ test_01_seq_fill_list_itr()

template<class T , typename Size_type >
static bool test_01_seq_fill_list_itr ( const std::string &  type_id,
const Size_type  size0,
const Size_type  reserve0,
const bool  do_print_mem 
)
static

Definition at line 164 of file test_hashset_perf01.cpp.

◆ get_capacity()

template<class T >
static std::size_t get_capacity ( const T &  data)
static

Definition at line 194 of file test_hashset_perf01.cpp.

◆ test_01_seq_fill_list_hash()

static bool test_01_seq_fill_list_hash ( const std::string &  type_id,
const std::size_t  size0,
const std::size_t  reserve0,
const bool  do_print_mem 
)
static

Definition at line 203 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ test_02_seq_fillunique_find_itr()

template<class T , typename Size_type >
static bool test_02_seq_fillunique_find_itr ( const std::string &  type_id,
const Size_type  size0,
const Size_type  reserve0 
)
static

Definition at line 234 of file test_hashset_perf01.cpp.

◆ test_02_seq_fillunique_find_hash()

static bool test_02_seq_fillunique_find_hash ( const std::string &  type_id,
const std::size_t  size0,
const std::size_t  reserve0 
)
static

Definition at line 256 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ footprint_fillseq_list_itr()

template<class T , typename Size_type >
static bool footprint_fillseq_list_itr ( const std::string &  type_id,
const bool  do_rserv 
)
static

Definition at line 284 of file test_hashset_perf01.cpp.

◆ footprint_fillseq_list_hash()

static bool footprint_fillseq_list_hash ( const std::string &  type_id,
const bool  do_rserv 
)
static

Definition at line 294 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ benchmark_fillunique_find_itr()

template<class T , typename Size_type >
static bool benchmark_fillunique_find_itr ( const std::string &  title_pre,
const std::string &  type_id,
const bool  do_rserv 
)
static

Definition at line 305 of file test_hashset_perf01.cpp.

◆ benchmark_fillunique_find_hash()

static bool benchmark_fillunique_find_hash ( const std::string &  title_pre,
const std::string &  type_id,
const bool  do_rserv 
)
static

Definition at line 333 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [1/2]

TEST_CASE ( "Memory Footprint 01 - Fill Sequential and List"  ,
""  [datatype][footprint] 
)

Definition at line 363 of file test_hashset_perf01.cpp.

◆ TEST_CASE() [2/2]

TEST_CASE ( "Perf Test 02 - Fill Unique and  List,
empty and reserve"  ,
""  [datatype][unique] 
)

Definition at line 377 of file test_hashset_perf01.cpp.

Variable Documentation

◆ start_addr_b

uint8_t start_addr_b[] = {0x20, 0x26, 0x2A, 0x01, 0x20, 0x10}
static

Definition at line 46 of file test_hashset_perf01.cpp.

◆ start_addr

Addr48Bit start_addr(start_addr_b) ( start_addr_b  )
static