|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83307 - sandbox/monotonic/libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2013-03-05 01:41:34
Author: cschladetsch
Date: 2013-03-05 01:41:33 EST (Tue, 05 Mar 2013)
New Revision: 83307
URL: http://svn.boost.org/trac/boost/changeset/83307
Log:
Re-added all test sizes
Deleted commented code
Text files modified:
sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h | 2 --
sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp | 39 ++++++++-------------------------------
2 files changed, 8 insertions(+), 33 deletions(-)
Modified: sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h (original)
+++ sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h 2013-03-05 01:41:33 EST (Tue, 05 Mar 2013)
@@ -29,9 +29,7 @@
FastPool = 2,
Pool = 4,
Monotonic = 8,
-#ifdef BOOST_MONOTONIC_TBB
Tbb = 16,
-#endif
Google = 32,
All = 0xffffffff,
};
Modified: sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp 2013-03-05 01:41:33 EST (Tue, 05 Mar 2013)
@@ -148,27 +148,6 @@
return make_pair(rand(), rand());
}
-#ifdef BOOST_MONOTONIC_TBB
-template <class Fun>
-PoolResults run_tests(size_t count, size_t max_length, size_t num_iterations, const char *title, Fun fun, Type types = Type::Tbb | Type::Standard | Type::Pool | Type::FastPool | Type::Monotonic)
-{
- cout << title << ": reps=" << count << ", len=" << max_length << ", steps=" << num_iterations << endl;
- PoolResults results;
- srand(42);
- boost::timer timer;
- for (size_t length = 10; length < max_length; length += max_length/num_iterations)
- {
- size_t required = length + length*length;
- if (random_numbers.size() < required)
- generate_n(back_inserter(random_numbers), required - random_numbers.size(), rand);
- if (random_pairs.size() < required)
- generate_n(back_inserter(random_pairs), required - random_pairs.size(), random_pair);
- results[length] = run_test(count, length, fun, types);
- }
- cout << endl << "took " << timer.elapsed() << "s" << endl;
- return results;
-}
-#else
template <class Fun>
PoolResults run_tests(size_t count, size_t max_length, size_t num_iterations, const char *title, Fun fun, Type types = Type::Standard | Type::Pool | Type::FastPool | Type::Monotonic)
{
@@ -189,8 +168,6 @@
return results;
}
-#endif
-
std::vector<PoolResult> cumulative;
PoolResult result_min, result_max;
bool first_result = true;
@@ -452,15 +429,15 @@
try
{
cout << "results of running test at:" << endl;
- cout << "https://svn.boost.org/svn/boost/sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp" << endl << endl;
+ cout << "https://svn.boost.org/svn/boost/sandbox/monotonic/libs/monotonic/test/Tests.h" << endl << endl;
boost::timer timer;
Type test_map_vector_types;
Type test_dupe_list_types;
- bool run_small = 0;//true;
- bool run_medium = 0;//true;
- bool run_large = 1;//true;
+ bool run_small = 1;
+ bool run_medium = 1;
+ bool run_large = 1;
// small-size (~100 elements) containers
if (run_small)
@@ -503,15 +480,15 @@
if (run_large)
{
heading("LARGE");
- print(run_tests(2, 25000, 10, "list_create<int>", test_list_create<int>()));
- print(run_tests(2, 100000, 10, "list_sort<int>", test_list_sort<int>()));
+ print(run_tests(5, 25000, 10, "list_create<int>", test_list_create<int>()));
+ print(run_tests(5, 100000, 10, "list_sort<int>", test_list_sort<int>()));
print(run_tests(1000, 100000, 10, "vector_create<int>", test_vector_create()));
print(run_tests(300, 50000, 10, "vector_sort<int>", test_vector_sort<int>()));
print(run_tests(200, 1000000, 10, "vector_dupe", test_vector_dupe()));
- print(run_tests(5, 10000, 10, "list_dupe", test_list_dupe(), test_dupe_list_types));
+ print(run_tests(10, 10000, 10, "list_dupe", test_list_dupe(), test_dupe_list_types));
print(run_tests(500, 100000, 10, "vector_accumulate", test_vector_accumulate()));
//print(run_tests(5, 500, 5, "set_vector", test_set_vector()));
- print(run_tests(10, 2000, 10, "map_vector<int>", test_map_vector<int>()));
+ print(run_tests(10, 20000, 10, "map_vector<int>", test_map_vector<int>()));
}
heading("FINAL SUMMARY", '*');
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk