libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
stack_string_performance.cpp File Reference
#include "stdafx.h"
#include <boost/test/included/unit_test.hpp>
#include <boost/mpl/list.hpp>
#include "core/stack_string.hpp"
#include "core/ave_deviation_meter.hpp"
#include "core/stats_output.hpp"
#include <chrono>
#include <iostream>
#include <string>
#include <ext/vstring.h>
Include dependency graph for stack_string_performance.cpp:

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   libjmmcg_tests
 

Typedefs

using timed_results_t = ave_deviation_meter< unsigned long long >
 
typedef boost::mpl::list< basic_stack_string< 12, char >, std::string, __gnu_cxx::__vstring > string_types
 

Functions

 BOOST_AUTO_TEST_CASE_TEMPLATE (small_ctor, T, string_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (big_ctor, T, string_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (small_assignment, T, string_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (big_assignment, T, string_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (small_replace, T, string_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (big_replace, T, string_types)
 

Variables

const unsigned short loops_for_conv =50
 
const double perc_conv_estimate =5.0
 
const unsigned long test_size =100U
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   libjmmcg_tests

Definition at line 21 of file stack_string_performance.cpp.

Typedef Documentation

◆ string_types

typedef boost::mpl::list< basic_stack_string< 12, char >, std::string, __gnu_cxx::__vstring > string_types

Definition at line 44 of file stack_string_performance.cpp.

◆ timed_results_t

typedef ave_deviation_meter< double > timed_results_t

Definition at line 38 of file stack_string_performance.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [1/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( big_assignment  ,
,
string_types   
)

Definition at line 201 of file stack_string_performance.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [2/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( big_ctor  ,
,
string_types   
)

Definition at line 147 of file stack_string_performance.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [3/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( big_replace  ,
,
string_types   
)

Definition at line 257 of file stack_string_performance.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [4/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( small_assignment  ,
,
string_types   
)

Definition at line 175 of file stack_string_performance.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [5/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( small_ctor  ,
,
string_types   
)

\xrefitem test 3. \xrefitem todo 12. \xrefitem test 154. \xrefitem todo 121.

Definition at line 123 of file stack_string_performance.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [6/6]

BOOST_AUTO_TEST_CASE_TEMPLATE ( small_replace  ,
,
string_types   
)

Definition at line 231 of file stack_string_performance.cpp.

Variable Documentation

◆ loops_for_conv

const unsigned short loops_for_conv =50

Definition at line 46 of file stack_string_performance.cpp.

◆ perc_conv_estimate

const double perc_conv_estimate =5.0

Definition at line 47 of file stack_string_performance.cpp.

◆ test_size

const unsigned long test_size =100U

Definition at line 51 of file stack_string_performance.cpp.