Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Macros | Functions | Variables
test_hashset_perf01.cpp File Reference
#include <iostream>
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <random>
#include <vector>
#include <unordered_set>
#include <catch2/catch_amalgamated.hpp>
#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.

Macros

#define CATCH_CONFIG_RUNNER
 
#define USE_JAU_ITER_ALGO   1
 

Functions

template<class T >
const DataType01findDataSet01_hash (T &data, DataType01 const &elem) noexcept
 
template<class T >
static int test_00_list_itr (T &data)
 
template<class T , typename Size_type >
static void test_00_seq_find_itr (T &data)
 
template<class T >
static void test_00_seq_find_hash (T &data)
 
template<class T , typename Size_type >
static void test_00_seq_fill (T &data, const Size_type 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_fill_unique_hash (T &data, const std::size_t size)
 
template<class T >
static void print_mem (const std::string &pre, const T &data)
 
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)
 
template<class T >
static std::size_t get_capacity (const 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_02_seq_fillunique_find_itr (const std::string &type_id, const Size_type size0, const Size_type reserve0)
 
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 footprint_fillseq_list_itr (const std::string &type_id, const bool do_rserv)
 
static bool footprint_fillseq_list_hash (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)
 
static bool benchmark_fillunique_find_hash (const std::string &title_pre, const std::string &type_id, const bool do_rserv)
 
 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 uint8_t start_addr_b [] = {0x20, 0x26, 0x2A, 0x01, 0x20, 0x10}
 
static Addr48Bit start_addr (start_addr_b)
 

Macro Definition Documentation

◆ CATCH_CONFIG_RUNNER

#define CATCH_CONFIG_RUNNER

Definition at line 33 of file test_hashset_perf01.cpp.

◆ USE_JAU_ITER_ALGO

#define USE_JAU_ITER_ALGO   1

Definition at line 55 of file test_hashset_perf01.cpp.

Function Documentation

◆ 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 340 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
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 312 of file test_hashset_perf01.cpp.

◆ findDataSet01_hash()

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

Definition at line 57 of file test_hashset_perf01.cpp.

Here is the caller graph for this function:

◆ footprint_fillseq_list_hash()

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

Definition at line 301 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
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 291 of file test_hashset_perf01.cpp.

◆ get_capacity()

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

Definition at line 201 of file test_hashset_perf01.cpp.

◆ print_mem()

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

Definition at line 152 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
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 66 of file test_hashset_perf01.cpp.

Here is the call 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 110 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

◆ 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 138 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 121 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

◆ test_00_seq_find_hash()

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

Definition at line 93 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_00_seq_find_itr()

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

Definition at line 76 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

◆ 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 210 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
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 171 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

◆ 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 263 of file test_hashset_perf01.cpp.

Here is the call graph for this function:
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 241 of file test_hashset_perf01.cpp.

◆ TEST_CASE() [1/2]

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

Definition at line 370 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/2]

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

Definition at line 384 of file test_hashset_perf01.cpp.

Here is the call graph for this function:

Variable Documentation

◆ start_addr

Addr48Bit start_addr(start_addr_b)
static

◆ start_addr_b

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

Definition at line 50 of file test_hashset_perf01.cpp.