From 9112d00bdff81ddb743a88c3c6467339840a8dd6 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 25 May 2016 22:39:53 +0300 Subject: [PATCH] Migrated map-insdel-string stress test to gtest --- projects/Win/vc14/cds.sln | 34 +- .../Win/vc14/stress-map-insdel-string.vcxproj | 280 +++++++++++++++ .../stress-map-insdel-string.vcxproj.filters | 60 ++++ projects/Win/vc14/unit-map-insdel.vcxproj | 322 ------------------ .../Win/vc14/unit-map-insdel.vcxproj.filters | 45 --- projects/source.unit.map.mk | 10 - test/stress/data/test-debug.conf | 4 +- test/stress/data/test-express.conf | 6 +- test/stress/data/test.conf | 4 +- test/stress/map/CMakeLists.txt | 2 + test/stress/map/insdel_string/CMakeLists.txt | 31 ++ .../map/insdel_string/map_insdel_string.cpp | 183 ++++++++++ .../map/insdel_string/map_insdel_string.h | 317 +++++++++++++++++ .../map_insdel_string_bronsonavltree.cpp | 38 +++ .../map_insdel_string_cuckoo.cpp | 38 +++ .../map_insdel_string_ellentree.cpp | 38 +++ .../map_insdel_string_feldman_hashset.cpp | 42 +++ .../map_insdel_string_michael.cpp | 38 +++ .../insdel_string/map_insdel_string_skip.cpp | 38 +++ .../insdel_string/map_insdel_string_split.cpp | 38 +++ .../insdel_string/map_insdel_string_std.cpp | 38 +++ .../map_insdel_string_striped.cpp | 38 +++ 22 files changed, 1241 insertions(+), 403 deletions(-) create mode 100644 projects/Win/vc14/stress-map-insdel-string.vcxproj create mode 100644 projects/Win/vc14/stress-map-insdel-string.vcxproj.filters delete mode 100644 projects/Win/vc14/unit-map-insdel.vcxproj delete mode 100644 projects/Win/vc14/unit-map-insdel.vcxproj.filters create mode 100644 test/stress/map/insdel_string/CMakeLists.txt create mode 100644 test/stress/map/insdel_string/map_insdel_string.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string.h create mode 100644 test/stress/map/insdel_string/map_insdel_string_bronsonavltree.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_cuckoo.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_ellentree.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_feldman_hashset.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_michael.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_skip.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_split.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_std.cpp create mode 100644 test/stress/map/insdel_string/map_insdel_string_striped.cpp diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index 24856539..66b87970 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -54,12 +54,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-find", "unit-map-f {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-insdel", "unit-map-insdel.vcxproj", "{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}" - ProjectSection(ProjectDependencies) = postProject - {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} - {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-insdel-item", "unit-map-insdel-item.vcxproj", "{7521DD92-56FF-4ECA-93E5-CCE50862354B}" ProjectSection(ProjectDependencies) = postProject {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} @@ -231,6 +225,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insdel-func", "s EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insdel-int", "stress-map-insdel-int.vcxproj", "{46649F79-2919-4B4C-B243-08C724901F58}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insdel-string", "stress-map-insdel-string.vcxproj", "{2D0E651D-058D-4D69-9A44-12149E6CA5BE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -289,18 +285,6 @@ Global {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|Win32.Build.0 = Release|Win32 {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|x64.ActiveCfg = Release|x64 {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|x64.Build.0 = Release|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Debug|Win32.ActiveCfg = Debug|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Debug|Win32.Build.0 = Debug|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Debug|x64.ActiveCfg = Debug|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Debug|x64.Build.0 = Debug|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.DebugVLD|x64.Build.0 = DebugVLD|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|Win32.ActiveCfg = Release|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|Win32.Build.0 = Release|Win32 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|x64.ActiveCfg = Release|x64 - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|x64.Build.0 = Release|x64 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.ActiveCfg = Debug|Win32 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.Build.0 = Debug|Win32 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|x64.ActiveCfg = Debug|x64 @@ -625,6 +609,18 @@ Global {46649F79-2919-4B4C-B243-08C724901F58}.Release|Win32.Build.0 = Release|Win32 {46649F79-2919-4B4C-B243-08C724901F58}.Release|x64.ActiveCfg = Release|x64 {46649F79-2919-4B4C-B243-08C724901F58}.Release|x64.Build.0 = Release|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Debug|Win32.Build.0 = Debug|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Debug|x64.ActiveCfg = Debug|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Debug|x64.Build.0 = Debug|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.DebugVLD|x64.Build.0 = DebugVLD|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Release|Win32.ActiveCfg = Release|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Release|Win32.Build.0 = Release|Win32 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Release|x64.ActiveCfg = Release|x64 + {2D0E651D-058D-4D69-9A44-12149E6CA5BE}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -634,7 +630,6 @@ Global {77350FDC-9E51-438B-9A8F-D2FEA11D46B2} = {B30CA283-1796-4763-92C3-2E4848D443F7} {6BB7A27F-FC59-4267-B6FA-D034176D1459} = {B30CA283-1796-4763-92C3-2E4848D443F7} {BA2A9239-0299-4069-BB0E-16DACE87ADE0} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {7521DD92-56FF-4ECA-93E5-CCE50862354B} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {5407E9D2-67D9-4266-976E-7A90BDE2541D} = {810490B7-31E5-49AE-8455-CAF99A9658B6} @@ -666,6 +661,7 @@ Global {C127CD80-E8A7-47E4-B7EC-1709D2188982} = {7D3EE35B-185D-40B5-88C2-7F9933426978} {34FA4110-F17B-4AD0-A4C9-C91B92AD06E4} = {7D3EE35B-185D-40B5-88C2-7F9933426978} {46649F79-2919-4B4C-B243-08C724901F58} = {7D3EE35B-185D-40B5-88C2-7F9933426978} + {2D0E651D-058D-4D69-9A44-12149E6CA5BE} = {7D3EE35B-185D-40B5-88C2-7F9933426978} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/projects/Win/vc14/stress-map-insdel-string.vcxproj b/projects/Win/vc14/stress-map-insdel-string.vcxproj new file mode 100644 index 00000000..0fd8dbb9 --- /dev/null +++ b/projects/Win/vc14/stress-map-insdel-string.vcxproj @@ -0,0 +1,280 @@ + + + + + DebugVLD + Win32 + + + DebugVLD + x64 + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + 4503 + 4503 + 4503 + 4503 + 4503 + 4503 + + + + + + 4503 + 4503 + 4503 + 4503 + 4503 + 4503 + + + + + + + + + + + + {2D0E651D-058D-4D69-9A44-12149E6CA5BE} + Win32Proj + stress_map_insdel_string + 8.1 + stress-map-insdel-string + + + + Application + true + v140 + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + false + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + + + false + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + true + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtest.lib;stress-framework.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + true + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtest.lib;stress-framework.lib;%(AdditionalDependencies) + + + + + + \ No newline at end of file diff --git a/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters b/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters new file mode 100644 index 00000000..b2a3f674 --- /dev/null +++ b/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + + + + \ No newline at end of file diff --git a/projects/Win/vc14/unit-map-insdel.vcxproj b/projects/Win/vc14/unit-map-insdel.vcxproj deleted file mode 100644 index d4a9ae8d..00000000 --- a/projects/Win/vc14/unit-map-insdel.vcxproj +++ /dev/null @@ -1,322 +0,0 @@ - - - - - DebugVLD - Win32 - - - DebugVLD - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} - unitmap - Win32Proj - 8.1 - - - - Application - Unicode - true - v140 - - - Application - Unicode - v140 - - - Application - Unicode - v140 - - - Application - Unicode - true - v140 - - - Application - Unicode - v140 - - - Application - Unicode - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - - - AllRules.ruleset - - - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - - - false - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX64 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - false - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX64 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - MaxSpeed - AnySuitable - true - Speed - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - $(TargetPath) - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - MaxSpeed - AnySuitable - true - Speed - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX64 - $(TargetPath) - MultiplyDefinedSymbolOnly - - - - - - \ No newline at end of file diff --git a/projects/Win/vc14/unit-map-insdel.vcxproj.filters b/projects/Win/vc14/unit-map-insdel.vcxproj.filters deleted file mode 100644 index f97c36bf..00000000 --- a/projects/Win/vc14/unit-map-insdel.vcxproj.filters +++ /dev/null @@ -1,45 +0,0 @@ - - - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - map_insdel_string - - - - - {f613f4ac-8b0f-4a85-81be-d243141b3ce3} - - - - - map_insdel_string - - - \ No newline at end of file diff --git a/projects/source.unit.map.mk b/projects/source.unit.map.mk index 2c9bf064..9a969fb4 100644 --- a/projects/source.unit.map.mk +++ b/projects/source.unit.map.mk @@ -28,16 +28,6 @@ CDSUNIT_MAP_SOURCES := \ tests/unit/map2/map_insdel_item_string_skip.cpp \ tests/unit/map2/map_insdel_item_string_split.cpp \ tests/unit/map2/map_insdel_item_string_striped.cpp \ - tests/unit/map2/map_insdel_string.cpp \ - tests/unit/map2/map_insdel_string_bronsonavltree.cpp \ - tests/unit/map2/map_insdel_string_cuckoo.cpp \ - tests/unit/map2/map_insdel_string_ellentree.cpp \ - tests/unit/map2/map_insdel_string_michael.cpp \ - tests/unit/map2/map_insdel_string_feldmanhashmap.cpp \ - tests/unit/map2/map_insdel_string_skip.cpp \ - tests/unit/map2/map_insdel_string_split.cpp \ - tests/unit/map2/map_insdel_string_striped.cpp \ - tests/unit/map2/map_insdel_string_std.cpp \ tests/unit/map2/map_insdelfind.cpp \ tests/unit/map2/map_insdelfind_bronsonavltree.cpp \ tests/unit/map2/map_insdelfind_cuckoo.cpp \ diff --git a/test/stress/data/test-debug.conf b/test/stress/data/test-debug.conf index 953793df..19efd10e 100644 --- a/test/stress/data/test-debug.conf +++ b/test/stress/data/test-debug.conf @@ -254,8 +254,8 @@ FeldmanMapArrayBits=4 [map_insdel_string] InsertThreadCount=4 DeleteThreadCount=4 -ThreadPassCount=8 -MapSize=10000 +ThreadPassCount=4 +MapSize=20000 MaxLoadFactor=4 PrintGCStateFlag=1 diff --git a/test/stress/data/test-express.conf b/test/stress/data/test-express.conf index e32e3b72..c9bec83b 100644 --- a/test/stress/data/test-express.conf +++ b/test/stress/data/test-express.conf @@ -215,7 +215,7 @@ InsertThreadCount=4 DeleteThreadCount=4 UpdateThreadCount=4 ThreadPassCount=4 -MapSize=100000 +MapSize=50000 MaxLoadFactor=4 # *** Cuckoo map properties @@ -248,8 +248,8 @@ FeldmanMapArrayBits=4 [map_insdel_string] InsertThreadCount=4 DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=100000 +ThreadPassCount=3 +MapSize=30000 MaxLoadFactor=4 PrintGCStateFlag=1 diff --git a/test/stress/data/test.conf b/test/stress/data/test.conf index e18b7071..431e971f 100644 --- a/test/stress/data/test.conf +++ b/test/stress/data/test.conf @@ -246,8 +246,8 @@ FeldmanMapArrayBits=4 [map_insdel_string] InsertThreadCount=4 DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=500000 +ThreadPassCount=5 +MapSize=50000 MaxLoadFactor=4 # *** Cuckoo map properties diff --git a/test/stress/map/CMakeLists.txt b/test/stress/map/CMakeLists.txt index a22b0c0a..ae634af8 100644 --- a/test/stress/map/CMakeLists.txt +++ b/test/stress/map/CMakeLists.txt @@ -6,6 +6,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_int) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_string) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_int) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) @@ -17,4 +18,5 @@ add_custom_target( stress-map stress-map-find-string stress-map-insdel-func stress-map-insdel-int + stress-map-insdel-string ) diff --git a/test/stress/map/insdel_string/CMakeLists.txt b/test/stress/map/insdel_string/CMakeLists.txt new file mode 100644 index 00000000..1e7858f9 --- /dev/null +++ b/test/stress/map/insdel_string/CMakeLists.txt @@ -0,0 +1,31 @@ +set(PACKAGE_NAME stress-map-insdel-string) + +set(CDSSTRESS_MAP_INSDEL_STRING_SOURCES + ../../main.cpp + map_insdel_string.cpp + map_insdel_string_bronsonavltree.cpp + map_insdel_string_cuckoo.cpp + map_insdel_string_ellentree.cpp + map_insdel_string_feldman_hashset.cpp + map_insdel_string_michael.cpp + map_insdel_string_skip.cpp + map_insdel_string_split.cpp + map_insdel_string_std.cpp + map_insdel_string_striped.cpp +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/.. +) + +add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSDEL_STRING_SOURCES} $) +target_link_libraries(${PACKAGE_NAME} + ${CDS_SHARED_LIBRARY} + ${GTEST_LIBRARY} + ${Boost_THREAD_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} +) + +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/test/stress/map/insdel_string/map_insdel_string.cpp b/test/stress/map/insdel_string/map_insdel_string.cpp new file mode 100644 index 00000000..df8a2f17 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string.cpp @@ -0,0 +1,183 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include + +namespace map { + + size_t Map_InsDel_string::s_nMapSize = 1000000; // map size + size_t Map_InsDel_string::s_nInsertThreadCount = 4; // count of insertion thread + size_t Map_InsDel_string::s_nDeleteThreadCount = 4; // count of deletion thread + size_t Map_InsDel_string::s_nThreadPassCount = 4; // pass count for each thread + size_t Map_InsDel_string::s_nMaxLoadFactor = 8; // maximum load factor + + size_t Map_InsDel_string::s_nCuckooInitialSize = 1024;// initial size for CuckooSet + size_t Map_InsDel_string::s_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset) + size_t Map_InsDel_string::s_nCuckooProbesetThreshold = 0; // CuckooSet probeset threshold (0 - use default) + + size_t Map_InsDel_string::s_nFeldmanMap_HeadBits = 10; + size_t Map_InsDel_string::s_nFeldmanMap_ArrayBits = 4; + + size_t Map_InsDel_string::s_nLoadFactor = 1; + std::vector Map_InsDel_string::s_arrKeys; + + void Map_InsDel_string::setup_test_case() + { + cds_test::config const& cfg = get_config( "map_insdel_string" ); + + s_nMapSize = cfg.get_size_t( "MapSize", s_nMapSize ); + if ( s_nMapSize < 1000 ) + s_nMapSize = 1000; + + s_nInsertThreadCount = cfg.get_size_t( "InsertThreadCount", s_nInsertThreadCount ); + if ( s_nInsertThreadCount == 0 ) + s_nInsertThreadCount = 2; + + s_nDeleteThreadCount = cfg.get_size_t( "DeleteThreadCount", s_nDeleteThreadCount ); + if ( s_nDeleteThreadCount == 0 ) + s_nDeleteThreadCount = 2; + + s_nThreadPassCount = cfg.get_size_t( "ThreadPassCount", s_nThreadPassCount ); + if ( s_nThreadPassCount == 0 ) + s_nThreadPassCount = 4; + + s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor ); + if ( s_nMaxLoadFactor == 0 ) + s_nMaxLoadFactor = 1; + + s_nCuckooInitialSize = cfg.get_size_t( "CuckooInitialSize", s_nCuckooInitialSize ); + if ( s_nCuckooInitialSize < 256 ) + s_nCuckooInitialSize = 256; + + s_nCuckooProbesetSize = cfg.get_size_t( "CuckooProbesetSize", s_nCuckooProbesetSize ); + if ( s_nCuckooProbesetSize < 8 ) + s_nCuckooProbesetSize = 8; + + s_nCuckooProbesetThreshold = cfg.get_size_t( "CuckooProbesetThreshold", s_nCuckooProbesetThreshold ); + + s_nFeldmanMap_HeadBits = cfg.get_size_t( "FeldmanMapHeadBits", s_nFeldmanMap_HeadBits ); + if ( s_nFeldmanMap_HeadBits == 0 ) + s_nFeldmanMap_HeadBits = 2; + + s_nFeldmanMap_ArrayBits = cfg.get_size_t( "FeldmanMapArrayBits", s_nFeldmanMap_ArrayBits ); + if ( s_nFeldmanMap_ArrayBits == 0 ) + s_nFeldmanMap_ArrayBits = 2; + } + + void Map_InsDel_string::SetUpTestCase() + { + setup_test_case(); + + s_arrKeys.clear(); + s_arrKeys.reserve( s_nMapSize ); + std::vector dict = load_dictionary(); + for ( size_t i = 0; i < s_nMapSize; ++i ) + s_arrKeys.push_back( std::move( dict.at(i) )); + } + + void Map_InsDel_string::TearDownTestCase() + { + s_arrKeys.clear(); + } + + std::vector Map_InsDel_string::get_load_factors() + { + cds_test::config const& cfg = get_config( "map_insdel_string" ); + + s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor ); + if ( s_nMaxLoadFactor == 0 ) + s_nMaxLoadFactor = 1; + + std::vector lf; + for ( size_t n = 1; n <= s_nMaxLoadFactor; n *= 2 ) + lf.push_back( n ); + + return lf; + } + + template + void Map_InsDel_string::fill_string_array() + { + typedef Hash hasher; + typedef typename hasher::result_type hash_type; + + std::map mapHash; + s_arrKeys.clear(); + std::vector dict = load_dictionary(); + + size_t nSize = dict.size(); + if ( nSize > s_nMapSize ) + nSize = s_nMapSize; + s_arrKeys.reserve( nSize ); + + size_t nDiffHash = 0; + hasher h; + for ( size_t i = 0; i < dict.size(); ++i ) { + hash_type hash = h( dict.at( i ) ); + if ( mapHash.insert( std::make_pair( hash, i ) ).second ) { + if ( ++nDiffHash >= nSize ) + break; + s_arrKeys.push_back( std::move( dict.at( i ) )); + } + } + s_nMapSize = dict.size(); + } + + void Map_InsDel_string_stdhash::SetUpTestCase() + { + setup_test_case(); + fill_string_array>(); + } + +#if CDS_BUILD_BITS == 64 + void Map_InsDel_string_city32::SetUpTestCase() + { + setup_test_case(); + fill_string_array(); + } + + void Map_InsDel_string_city64::SetUpTestCase() + { + setup_test_case(); + fill_string_array(); + } + + void Map_InsDel_string_city128::SetUpTestCase() + { + setup_test_case(); + fill_string_array(); + } + +#endif + + + INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors())); +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string.h b/test/stress/map/insdel_string/map_insdel_string.h new file mode 100644 index 00000000..4948c4e2 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string.h @@ -0,0 +1,317 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_type.h" + +namespace map { + +#define TEST_CASE(TAG, X) void X(); + + class Map_InsDel_string: public cds_test::stress_fixture + { + public: + static size_t s_nMapSize; // map size + static size_t s_nInsertThreadCount; // count of insertion thread + static size_t s_nDeleteThreadCount; // count of deletion thread + static size_t s_nThreadPassCount; // pass count for each thread + static size_t s_nMaxLoadFactor; // maximum load factor + + static size_t s_nCuckooInitialSize; // initial size for CuckooMap + static size_t s_nCuckooProbesetSize; // CuckooMap probeset size (only for list-based probeset) + static size_t s_nCuckooProbesetThreshold; // CuckooMap probeset threshold (o - use default) + + static size_t s_nFeldmanMap_HeadBits; + static size_t s_nFeldmanMap_ArrayBits; + + static size_t s_nLoadFactor; // current load factor + + static void SetUpTestCase(); + static void TearDownTestCase(); + + static void setup_test_case(); + static std::vector get_load_factors(); + + typedef std::string key_type; + typedef size_t value_type; + + static std::vector s_arrKeys; + + protected: + enum { + insert_thread, + delete_thread + }; + + template + class Inserter: public cds_test::thread + { + typedef cds_test::thread base_class; + Map& m_Map; + + public: + size_t m_nInsertSuccess = 0; + size_t m_nInsertFailed = 0; + + public: + Inserter( cds_test::thread_pool& pool, Map& map ) + : base_class( pool, insert_thread ) + , m_Map( map ) + {} + + Inserter( Inserter& src ) + : base_class( src ) + , m_Map( src.m_Map ) + {} + + virtual thread * clone() + { + return new Inserter( *this ); + } + + virtual void test() + { + Map& rMap = m_Map; + + if ( id() & 1 ) { + for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) { + for ( auto it = s_arrKeys.cbegin(), itEnd = s_arrKeys.cend(); it != itEnd; ++it ) { + if ( rMap.insert( *it, 0 )) + ++m_nInsertSuccess; + else + ++m_nInsertFailed; + } + } + } + else { + for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) { + for ( auto it = s_arrKeys.crbegin(), itEnd = s_arrKeys.crend(); it != itEnd; ++it ) { + if ( rMap.insert( *it, 1 )) + ++m_nInsertSuccess; + else + ++m_nInsertFailed; + } + } + } + } + }; + + template + class Deleter: public cds_test::thread + { + typedef cds_test::thread base_class; + Map& m_Map; + + public: + size_t m_nDeleteSuccess = 0; + size_t m_nDeleteFailed = 0; + + public: + Deleter( cds_test::thread_pool& pool, Map& map ) + : base_class( pool, delete_thread ) + , m_Map( map ) + {} + + Deleter( Deleter& src ) + : base_class( src ) + , m_Map( src.m_Map ) + {} + + virtual thread * clone() + { + return new Deleter( *this ); + } + + virtual void test() + { + Map& rMap = m_Map; + + if ( id() & 1 ) { + for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) { + for ( auto it = s_arrKeys.cbegin(), itEnd = s_arrKeys.cend(); it != itEnd; ++it ) { + if ( rMap.erase( *it )) + ++m_nDeleteSuccess; + else + ++m_nDeleteFailed; + } + } + } + else { + for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) { + for ( auto it = s_arrKeys.crbegin(), itEnd = s_arrKeys.crend(); it != itEnd; ++it ) { + if ( rMap.erase( *it )) + ++m_nDeleteSuccess; + else + ++m_nDeleteFailed; + } + } + } + } + }; + + protected: + template + static void fill_string_array(); + + template + void do_test( Map& testMap ) + { + typedef Inserter inserter; + typedef Deleter deleter; + + cds_test::thread_pool& pool = get_pool(); + pool.add( new inserter( pool, testMap ), s_nInsertThreadCount ); + pool.add( new deleter( pool, testMap ), s_nDeleteThreadCount ); + + propout() << std::make_pair( "insert_thread_count", s_nInsertThreadCount ) + << std::make_pair( "delete_thread_count", s_nDeleteThreadCount ) + << std::make_pair( "pass_count", s_nThreadPassCount ) + << std::make_pair( "map_size", s_nMapSize ); + + std::chrono::milliseconds duration = pool.run(); + + propout() << std::make_pair( "duration", duration ); + + size_t nInsertSuccess = 0; + size_t nInsertFailed = 0; + size_t nDeleteSuccess = 0; + size_t nDeleteFailed = 0; + + for ( size_t i = 0; i < pool.size(); ++i ) { + cds_test::thread& thr = pool.get( i ); + switch ( thr.type() ) { + case insert_thread: + { + inserter& t = static_cast(thr); + nInsertSuccess += t.m_nInsertSuccess; + nInsertFailed += t.m_nInsertFailed; + } + break; + case delete_thread: + { + deleter& t = static_cast(thr); + nDeleteSuccess += t.m_nDeleteSuccess; + nDeleteFailed += t.m_nDeleteFailed; + } + break; + default: + assert( false ); + } + } + + propout() + << std::make_pair( "insert_success", nInsertSuccess ) + << std::make_pair( "insert_failed", nInsertFailed ) + << std::make_pair( "delete_success", nDeleteSuccess ) + << std::make_pair( "delete_failed", nDeleteFailed ) + << std::make_pair( "finish_map_size", testMap.size() ); + + check_before_cleanup( testMap ); + + testMap.clear(); + EXPECT_TRUE( testMap.empty() ); + + additional_check( testMap ); + print_stat( propout(), testMap ); + additional_cleanup( testMap ); + } + + template + void run_test() + { + Map testMap( *this ); + do_test( testMap ); + } + }; + + class Map_InsDel_string_stdhash: public Map_InsDel_string + { + public: + static void SetUpTestCase(); + + template + void run_test() + { + Map_InsDel_string::run_test(); + } + }; + +#if CDS_BUILD_BITS == 64 + class Map_InsDel_string_city32: public Map_InsDel_string + { + public: + static void SetUpTestCase(); + + template + void run_test() + { + Map_InsDel_string::run_test(); + } + }; + + class Map_InsDel_string_city64: public Map_InsDel_string + { + public: + static void SetUpTestCase(); + + template + void run_test() + { + Map_InsDel_string::run_test(); + } + }; + + class Map_InsDel_string_city128: public Map_InsDel_string + { + public: + static void SetUpTestCase(); + + template + void run_test() + { + Map_InsDel_string::run_test(); + } + }; + +#endif // #if CDS_BUILD_BITS == 64 + + class Map_InsDel_string_LF: public Map_InsDel_string + , public ::testing::WithParamInterface + { + public: + template + void run_test() + { + s_nLoadFactor = GetParam(); + propout() << std::make_pair( "load_factor", s_nLoadFactor ); + Map_InsDel_string::run_test(); + } + }; + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_bronsonavltree.cpp b/test/stress/map/insdel_string/map_insdel_string_bronsonavltree.cpp new file mode 100644 index 00000000..fc0ef8c2 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_bronsonavltree.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_bronson_avltree.h" + +namespace map { + + CDSSTRESS_BronsonAVLTreeMap( Map_InsDel_string, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_cuckoo.cpp b/test/stress/map/insdel_string/map_insdel_string_cuckoo.cpp new file mode 100644 index 00000000..165d1836 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_cuckoo.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_cuckoo.h" + +namespace map { + + CDSSTRESS_CuckooMap( Map_InsDel_string, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_ellentree.cpp b/test/stress/map/insdel_string/map_insdel_string_ellentree.cpp new file mode 100644 index 00000000..02fef1a5 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_ellentree.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_ellen_bintree.h" + +namespace map { + + CDSSTRESS_EllenBinTreeMap( Map_InsDel_string, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_feldman_hashset.cpp b/test/stress/map/insdel_string/map_insdel_string_feldman_hashset.cpp new file mode 100644 index 00000000..291e3c89 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_feldman_hashset.cpp @@ -0,0 +1,42 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_feldman_hashmap.h" + +namespace map { + + CDSSTRESS_FeldmanHashMap_stdhash( Map_InsDel_string_stdhash, run_test, std::string, size_t ) +#if CDS_BUILD_BITS == 64 + CDSSTRESS_FeldmanHashMap_city64( Map_InsDel_string_city64, run_test, std::string, size_t ) + CDSSTRESS_FeldmanHashMap_city128( Map_InsDel_string_city128, run_test, std::string, size_t ) +#endif + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_michael.cpp b/test/stress/map/insdel_string/map_insdel_string_michael.cpp new file mode 100644 index 00000000..9225a0fa --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_michael.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_michael.h" + +namespace map { + + CDSSTRESS_MichaelMap( Map_InsDel_string_LF, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_skip.cpp b/test/stress/map/insdel_string/map_insdel_string_skip.cpp new file mode 100644 index 00000000..4fdf29c5 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_skip.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_skip_list.h" + +namespace map { + + CDSSTRESS_SkipListMap( Map_InsDel_string, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_split.cpp b/test/stress/map/insdel_string/map_insdel_string_split.cpp new file mode 100644 index 00000000..d1dbfc33 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_split.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_split_list.h" + +namespace map { + + CDSSTRESS_SplitListMap( Map_InsDel_string_LF, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_std.cpp b/test/stress/map/insdel_string/map_insdel_string_std.cpp new file mode 100644 index 00000000..b4ce6477 --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_std.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_std.h" + +namespace map { + + CDSSTRESS_StdMap( Map_InsDel_string, run_test, std::string, size_t ) + +} // namespace map diff --git a/test/stress/map/insdel_string/map_insdel_string_striped.cpp b/test/stress/map/insdel_string/map_insdel_string_striped.cpp new file mode 100644 index 00000000..e653b23e --- /dev/null +++ b/test/stress/map/insdel_string/map_insdel_string_striped.cpp @@ -0,0 +1,38 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "map_insdel_string.h" +#include "map_type_striped.h" + +namespace map { + + CDSSTRESS_StripedMap( Map_InsDel_string_LF, run_test, std::string, size_t ) + +} // namespace map -- 2.34.1