data-structure-typed 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/CMakeLists.txt +52 -0
- package/README.md +4 -4
- package/README_CN.md +5 -5
- package/benchmark/report.html +141 -12
- package/benchmark/report.json +1969 -38
- package/build/CMakeCache.txt +603 -0
- package/build/CMakeFiles/4.0.3/CMakeCXXCompiler.cmake +104 -0
- package/build/CMakeFiles/4.0.3/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/build/CMakeFiles/4.0.3/CMakeSystem.cmake +15 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/CMakeCXXCompilerId.cpp +920 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/a.out +0 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/apple-sdk.cpp +1 -0
- package/build/CMakeFiles/CMakeConfigureLog.yaml +2146 -0
- package/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/CMakeFiles/InstallScripts.json +9 -0
- package/build/CMakeFiles/Makefile.cmake +100 -0
- package/build/CMakeFiles/Makefile2 +720 -0
- package/build/CMakeFiles/TargetDirectories.txt +23 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp.o +0 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp.o.d +835 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/test/performance/data-structures/binary-tree/avl-tree.test.cpp.o +0 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/test/performance/data-structures/binary-tree/avl-tree.test.cpp.o.d +835 -0
- package/build/CMakeFiles/cmake.check_cache +1 -0
- package/build/CMakeFiles/deque-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/deque-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/deque-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.internal +791 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.make +2362 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/deque-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/deque-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/deque-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/deque-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/deque-benchmark.dir/test/performance/data-structures/queue/deque.test.cpp.o +0 -0
- package/build/CMakeFiles/deque-benchmark.dir/test/performance/data-structures/queue/deque.test.cpp.o.d +787 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp.o +0 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp.o.d +786 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/test/performance/data-structures/hash/hash-map.test.cpp.o +0 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/test/performance/data-structures/hash/hash-map.test.cpp.o.d +786 -0
- package/build/CMakeFiles/heap-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/heap-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/heap-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.internal +843 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.make +2518 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/heap-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/heap-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/heap-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/heap-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/heap-benchmark.dir/test/performance/data-structures/heap/heap.test.cpp.o +0 -0
- package/build/CMakeFiles/heap-benchmark.dir/test/performance/data-structures/heap/heap.test.cpp.o.d +839 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/test/performance/data-structures/priority-queue/priority-queue.test.cpp.o +0 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/test/performance/data-structures/priority-queue/priority-queue.test.cpp.o.d +789 -0
- package/build/CMakeFiles/progress.marks +1 -0
- package/build/CMakeFiles/queue-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/queue-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/queue-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/queue-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/queue-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/queue-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/queue-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/queue-benchmark.dir/test/performance/data-structures/queue/queue.test.cpp.o +0 -0
- package/build/CMakeFiles/queue-benchmark.dir/test/performance/data-structures/queue/queue.test.cpp.o.d +789 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/test/performance/data-structures/binary-tree/red-black-tree.test.cpp.o +0 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/test/performance/data-structures/binary-tree/red-black-tree.test.cpp.o.d +835 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/singly-linked-list.test.cpp.o +0 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/singly-linked-list.test.cpp.o.d +786 -0
- package/build/CMakeFiles/stack-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/stack-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/stack-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/stack-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/stack-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/stack-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/stack-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/stack-benchmark.dir/test/performance/data-structures/stack/stack.test.cpp.o +0 -0
- package/build/CMakeFiles/stack-benchmark.dir/test/performance/data-structures/stack/stack.test.cpp.o.d +789 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-map.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-map.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-set.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-set.test.cpp.o.d +835 -0
- package/build/Makefile +783 -0
- package/build/_deps/benchmark-build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-build/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-build/Makefile +140 -0
- package/build/_deps/benchmark-build/benchmark.pc +12 -0
- package/build/_deps/benchmark-build/benchmarkConfig.cmake +14 -0
- package/build/_deps/benchmark-build/benchmarkConfigVersion.cmake +65 -0
- package/build/_deps/benchmark-build/benchmarkTargets.cmake +84 -0
- package/build/_deps/benchmark-build/cmake_install.cmake +50 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/DependInfo.cmake +41 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark.cc.o.d +875 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o.d +802 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_name.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_name.cc.o.d +772 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o.d +841 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o.d +833 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/build.make +402 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/check.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/check.cc.o.d +784 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/cmake_clean.cmake +47 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/cmake_clean_target.cmake +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/colorprint.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/colorprint.cc.o.d +791 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o.d +795 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.internal +15519 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.make +17500 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/complexity.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/complexity.cc.o.d +793 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/console_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/console_reporter.cc.o.d +802 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/counter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/counter.cc.o.d +773 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o.d +799 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/depend.make +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/flags.make +10 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/json_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/json_reporter.cc.o.d +800 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/link.txt +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/perf_counters.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/perf_counters.cc.o.d +807 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/progress.make +21 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/reporter.cc.o.d +798 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/statistics.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/statistics.cc.o.d +800 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/string_util.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/string_util.cc.o.d +795 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/sysinfo.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/sysinfo.cc.o.d +933 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/timers.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/timers.cc.o.d +904 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/DependInfo.cmake +23 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o.d +772 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/build.make +114 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/cmake_clean.cmake +11 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/cmake_clean_target.cmake +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.internal +776 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.make +2317 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/depend.make +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/flags.make +10 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/link.txt +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/progress.make +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-build/src/Makefile +710 -0
- package/build/_deps/benchmark-build/src/cmake_install.cmake +45 -0
- package/build/_deps/benchmark-build/src/libbenchmark.a +0 -0
- package/build/_deps/benchmark-build/src/libbenchmark_main.a +0 -0
- package/build/_deps/benchmark-src/.clang-format +5 -0
- package/build/_deps/benchmark-src/.clang-tidy +7 -0
- package/build/_deps/benchmark-src/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/build/_deps/benchmark-src/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/build/_deps/benchmark-src/.github/install_bazel.sh +13 -0
- package/build/_deps/benchmark-src/.github/libcxx-setup.sh +26 -0
- package/build/_deps/benchmark-src/.github/workflows/bazel.yml +35 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test-min-cmake.yml +46 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test-perfcounters.yml +51 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test.yml +114 -0
- package/build/_deps/benchmark-src/.github/workflows/clang-format-lint.yml +17 -0
- package/build/_deps/benchmark-src/.github/workflows/clang-tidy.yml +38 -0
- package/build/_deps/benchmark-src/.github/workflows/doxygen.yml +28 -0
- package/build/_deps/benchmark-src/.github/workflows/pylint.yml +28 -0
- package/build/_deps/benchmark-src/.github/workflows/sanitizer.yml +96 -0
- package/build/_deps/benchmark-src/.github/workflows/test_bindings.yml +29 -0
- package/build/_deps/benchmark-src/.github/workflows/wheels.yml +79 -0
- package/build/_deps/benchmark-src/.travis.yml +208 -0
- package/build/_deps/benchmark-src/.ycm_extra_conf.py +115 -0
- package/build/_deps/benchmark-src/AUTHORS +71 -0
- package/build/_deps/benchmark-src/BUILD.bazel +87 -0
- package/build/_deps/benchmark-src/CMakeLists.txt +340 -0
- package/build/_deps/benchmark-src/CONTRIBUTING.md +58 -0
- package/build/_deps/benchmark-src/CONTRIBUTORS +95 -0
- package/build/_deps/benchmark-src/LICENSE +202 -0
- package/build/_deps/benchmark-src/MODULE.bazel +24 -0
- package/build/_deps/benchmark-src/README.md +223 -0
- package/build/_deps/benchmark-src/WORKSPACE +22 -0
- package/build/_deps/benchmark-src/WORKSPACE.bzlmod +2 -0
- package/build/_deps/benchmark-src/_config.yml +2 -0
- package/build/_deps/benchmark-src/appveyor.yml +50 -0
- package/build/_deps/benchmark-src/bazel/benchmark_deps.bzl +65 -0
- package/build/_deps/benchmark-src/bindings/python/BUILD +3 -0
- package/build/_deps/benchmark-src/bindings/python/build_defs.bzl +25 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/BUILD +40 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/__init__.py +162 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/benchmark.cc +184 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/example.py +136 -0
- package/build/_deps/benchmark-src/bindings/python/nanobind.BUILD +17 -0
- package/build/_deps/benchmark-src/bindings/python/python_headers.BUILD +6 -0
- package/build/_deps/benchmark-src/cmake/AddCXXCompilerFlag.cmake +78 -0
- package/build/_deps/benchmark-src/cmake/CXXFeatureCheck.cmake +82 -0
- package/build/_deps/benchmark-src/cmake/Config.cmake.in +7 -0
- package/build/_deps/benchmark-src/cmake/GetGitVersion.cmake +58 -0
- package/build/_deps/benchmark-src/cmake/GoogleTest.cmake +58 -0
- package/build/_deps/benchmark-src/cmake/GoogleTest.cmake.in +59 -0
- package/build/_deps/benchmark-src/cmake/benchmark.pc.in +12 -0
- package/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp +12 -0
- package/build/_deps/benchmark-src/cmake/llvm-toolchain.cmake +8 -0
- package/build/_deps/benchmark-src/cmake/posix_regex.cpp +14 -0
- package/build/_deps/benchmark-src/cmake/pthread_affinity.cpp +16 -0
- package/build/_deps/benchmark-src/cmake/split_list.cmake +3 -0
- package/build/_deps/benchmark-src/cmake/std_regex.cpp +10 -0
- package/build/_deps/benchmark-src/cmake/steady_clock.cpp +7 -0
- package/build/_deps/benchmark-src/cmake/thread_safety_attributes.cpp +4 -0
- package/build/_deps/benchmark-src/docs/AssemblyTests.md +149 -0
- package/build/_deps/benchmark-src/docs/_config.yml +3 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon.png +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon.xcf +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon_black.png +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon_black.xcf +0 -0
- package/build/_deps/benchmark-src/docs/dependencies.md +13 -0
- package/build/_deps/benchmark-src/docs/index.md +12 -0
- package/build/_deps/benchmark-src/docs/perf_counters.md +35 -0
- package/build/_deps/benchmark-src/docs/platform_specific_build_instructions.md +48 -0
- package/build/_deps/benchmark-src/docs/python_bindings.md +34 -0
- package/build/_deps/benchmark-src/docs/random_interleaving.md +13 -0
- package/build/_deps/benchmark-src/docs/reducing_variance.md +100 -0
- package/build/_deps/benchmark-src/docs/releasing.md +41 -0
- package/build/_deps/benchmark-src/docs/tools.md +343 -0
- package/build/_deps/benchmark-src/docs/user_guide.md +1266 -0
- package/build/_deps/benchmark-src/include/benchmark/benchmark.h +1991 -0
- package/build/_deps/benchmark-src/include/benchmark/export.h +47 -0
- package/build/_deps/benchmark-src/pyproject.toml +50 -0
- package/build/_deps/benchmark-src/setup.py +113 -0
- package/build/_deps/benchmark-src/src/CMakeLists.txt +170 -0
- package/build/_deps/benchmark-src/src/arraysize.h +33 -0
- package/build/_deps/benchmark-src/src/benchmark.cc +779 -0
- package/build/_deps/benchmark-src/src/benchmark_api_internal.cc +118 -0
- package/build/_deps/benchmark-src/src/benchmark_api_internal.h +87 -0
- package/build/_deps/benchmark-src/src/benchmark_main.cc +18 -0
- package/build/_deps/benchmark-src/src/benchmark_name.cc +59 -0
- package/build/_deps/benchmark-src/src/benchmark_register.cc +520 -0
- package/build/_deps/benchmark-src/src/benchmark_register.h +109 -0
- package/build/_deps/benchmark-src/src/benchmark_runner.cc +497 -0
- package/build/_deps/benchmark-src/src/benchmark_runner.h +131 -0
- package/build/_deps/benchmark-src/src/check.cc +11 -0
- package/build/_deps/benchmark-src/src/check.h +106 -0
- package/build/_deps/benchmark-src/src/colorprint.cc +200 -0
- package/build/_deps/benchmark-src/src/colorprint.h +33 -0
- package/build/_deps/benchmark-src/src/commandlineflags.cc +298 -0
- package/build/_deps/benchmark-src/src/commandlineflags.h +133 -0
- package/build/_deps/benchmark-src/src/complexity.cc +244 -0
- package/build/_deps/benchmark-src/src/complexity.h +55 -0
- package/build/_deps/benchmark-src/src/console_reporter.cc +206 -0
- package/build/_deps/benchmark-src/src/counter.cc +80 -0
- package/build/_deps/benchmark-src/src/counter.h +32 -0
- package/build/_deps/benchmark-src/src/csv_reporter.cc +161 -0
- package/build/_deps/benchmark-src/src/cycleclock.h +230 -0
- package/build/_deps/benchmark-src/src/internal_macros.h +115 -0
- package/build/_deps/benchmark-src/src/json_reporter.cc +320 -0
- package/build/_deps/benchmark-src/src/log.h +88 -0
- package/build/_deps/benchmark-src/src/mutex.h +155 -0
- package/build/_deps/benchmark-src/src/perf_counters.cc +282 -0
- package/build/_deps/benchmark-src/src/perf_counters.h +200 -0
- package/build/_deps/benchmark-src/src/re.h +158 -0
- package/build/_deps/benchmark-src/src/reporter.cc +118 -0
- package/build/_deps/benchmark-src/src/statistics.cc +209 -0
- package/build/_deps/benchmark-src/src/statistics.h +44 -0
- package/build/_deps/benchmark-src/src/string_util.cc +254 -0
- package/build/_deps/benchmark-src/src/string_util.h +70 -0
- package/build/_deps/benchmark-src/src/sysinfo.cc +855 -0
- package/build/_deps/benchmark-src/src/thread_manager.h +63 -0
- package/build/_deps/benchmark-src/src/thread_timer.h +86 -0
- package/build/_deps/benchmark-src/src/timers.cc +272 -0
- package/build/_deps/benchmark-src/src/timers.h +48 -0
- package/build/_deps/benchmark-src/test/AssemblyTests.cmake +67 -0
- package/build/_deps/benchmark-src/test/BUILD +127 -0
- package/build/_deps/benchmark-src/test/CMakeLists.txt +309 -0
- package/build/_deps/benchmark-src/test/args_product_test.cc +77 -0
- package/build/_deps/benchmark-src/test/basic_test.cc +180 -0
- package/build/_deps/benchmark-src/test/benchmark_gtest.cc +169 -0
- package/build/_deps/benchmark-src/test/benchmark_min_time_flag_iters_test.cc +66 -0
- package/build/_deps/benchmark-src/test/benchmark_min_time_flag_time_test.cc +90 -0
- package/build/_deps/benchmark-src/test/benchmark_name_gtest.cc +82 -0
- package/build/_deps/benchmark-src/test/benchmark_random_interleaving_gtest.cc +126 -0
- package/build/_deps/benchmark-src/test/benchmark_setup_teardown_test.cc +157 -0
- package/build/_deps/benchmark-src/test/benchmark_test.cc +274 -0
- package/build/_deps/benchmark-src/test/clobber_memory_assembly_test.cc +64 -0
- package/build/_deps/benchmark-src/test/commandlineflags_gtest.cc +228 -0
- package/build/_deps/benchmark-src/test/complexity_test.cc +228 -0
- package/build/_deps/benchmark-src/test/cxx03_test.cc +62 -0
- package/build/_deps/benchmark-src/test/diagnostics_test.cc +91 -0
- package/build/_deps/benchmark-src/test/display_aggregates_only_test.cc +45 -0
- package/build/_deps/benchmark-src/test/donotoptimize_assembly_test.cc +201 -0
- package/build/_deps/benchmark-src/test/donotoptimize_test.cc +69 -0
- package/build/_deps/benchmark-src/test/filter_test.cc +117 -0
- package/build/_deps/benchmark-src/test/fixture_test.cc +51 -0
- package/build/_deps/benchmark-src/test/internal_threading_test.cc +185 -0
- package/build/_deps/benchmark-src/test/link_main_test.cc +9 -0
- package/build/_deps/benchmark-src/test/map_test.cc +59 -0
- package/build/_deps/benchmark-src/test/memory_manager_test.cc +47 -0
- package/build/_deps/benchmark-src/test/min_time_parse_gtest.cc +30 -0
- package/build/_deps/benchmark-src/test/multiple_ranges_test.cc +96 -0
- package/build/_deps/benchmark-src/test/options_test.cc +77 -0
- package/build/_deps/benchmark-src/test/output_test.h +211 -0
- package/build/_deps/benchmark-src/test/output_test_helper.cc +519 -0
- package/build/_deps/benchmark-src/test/perf_counters_gtest.cc +307 -0
- package/build/_deps/benchmark-src/test/perf_counters_test.cc +92 -0
- package/build/_deps/benchmark-src/test/register_benchmark_test.cc +196 -0
- package/build/_deps/benchmark-src/test/repetitions_test.cc +214 -0
- package/build/_deps/benchmark-src/test/report_aggregates_only_test.cc +41 -0
- package/build/_deps/benchmark-src/test/reporter_output_test.cc +1130 -0
- package/build/_deps/benchmark-src/test/skip_with_error_test.cc +199 -0
- package/build/_deps/benchmark-src/test/spec_arg_test.cc +105 -0
- package/build/_deps/benchmark-src/test/spec_arg_verbosity_test.cc +43 -0
- package/build/_deps/benchmark-src/test/state_assembly_test.cc +68 -0
- package/build/_deps/benchmark-src/test/statistics_gtest.cc +35 -0
- package/build/_deps/benchmark-src/test/string_util_gtest.cc +199 -0
- package/build/_deps/benchmark-src/test/templated_fixture_test.cc +28 -0
- package/build/_deps/benchmark-src/test/time_unit_gtest.cc +37 -0
- package/build/_deps/benchmark-src/test/user_counters_tabular_test.cc +558 -0
- package/build/_deps/benchmark-src/test/user_counters_test.cc +561 -0
- package/build/_deps/benchmark-src/test/user_counters_thousands_test.cc +186 -0
- package/build/_deps/benchmark-src/tools/BUILD.bazel +19 -0
- package/build/_deps/benchmark-src/tools/compare.py +432 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test1_run1.json +127 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test1_run2.json +127 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test2_run.json +81 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test3_run0.json +65 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test3_run1.json +65 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run.json +96 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run0.json +21 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run1.json +21 -0
- package/build/_deps/benchmark-src/tools/gbench/__init__.py +8 -0
- package/build/_deps/benchmark-src/tools/gbench/report.py +1201 -0
- package/build/_deps/benchmark-src/tools/gbench/util.py +203 -0
- package/build/_deps/benchmark-src/tools/libpfm.BUILD.bazel +22 -0
- package/build/_deps/benchmark-src/tools/requirements.txt +2 -0
- package/build/_deps/benchmark-src/tools/strip_asm.py +151 -0
- package/build/_deps/benchmark-subbuild/CMakeCache.txt +133 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/4.0.3/CMakeSystem.cmake +15 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeConfigureLog.yaml +11 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeRuleHashes.txt +11 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/InstallScripts.json +7 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/Makefile.cmake +52 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/Makefile2 +122 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/TargetDirectories.txt +3 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/DependInfo.cmake +22 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/Labels.json +46 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/Labels.txt +14 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/build.make +162 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/cmake_clean.cmake +17 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/compiler_depend.make +2 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/progress.make +10 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/cmake.check_cache +1 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-subbuild/CMakeLists.txt +42 -0
- package/build/_deps/benchmark-subbuild/Makefile +162 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-gitclone-lastrun.txt +15 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-gitinfo.txt +15 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-patch-info.txt +6 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-update-info.txt +7 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-cfgcmd.txt +1 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-gitclone.cmake +87 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-gitupdate.cmake +317 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-mkdirs.cmake +27 -0
- package/build/_deps/benchmark-subbuild/cmake_install.cmake +56 -0
- package/build/bin/avl-rb-range-search-benchmark +0 -0
- package/build/bin/avl-tree-benchmark +0 -0
- package/build/bin/deque-benchmark +0 -0
- package/build/bin/doubly-linked-list-benchmark +0 -0
- package/build/bin/hash-map-benchmark +0 -0
- package/build/bin/heap-benchmark +0 -0
- package/build/bin/priority-queue-benchmark +0 -0
- package/build/bin/queue-benchmark +0 -0
- package/build/bin/red-black-tree-benchmark +0 -0
- package/build/bin/singly-linked-list-benchmark +0 -0
- package/build/bin/stack-benchmark +0 -0
- package/build/bin/tree-map-benchmark +0 -0
- package/build/bin/tree-multi-map-benchmark +0 -0
- package/build/bin/tree-multi-set-benchmark +0 -0
- package/build/bin/tree-set-benchmark +0 -0
- package/build/cmake_install.cmake +66 -0
- package/dist/cjs/index.cjs +1270 -1201
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +1309 -1210
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1268 -1196
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +1307 -1205
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/index.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +177 -0
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +230 -147
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +263 -0
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +170 -0
- package/dist/types/interfaces/binary-tree.d.ts +1 -1
- package/dist/types/types/data-structures/binary-tree/index.d.ts +3 -3
- package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +28 -0
- package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +11 -0
- package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +28 -0
- package/dist/umd/data-structure-typed.js +1303 -1194
- package/dist/umd/data-structure-typed.js.map +1 -1
- package/dist/umd/data-structure-typed.min.js +10 -3
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/eslint.config.mjs +5 -1
- package/package.json +4 -3
- package/src/data-structures/binary-tree/avl-tree.ts +1 -1
- package/src/data-structures/binary-tree/binary-tree.ts +40 -16
- package/src/data-structures/binary-tree/bst.ts +6 -6
- package/src/data-structures/binary-tree/index.ts +3 -3
- package/src/data-structures/binary-tree/red-black-tree.ts +34 -52
- package/src/data-structures/binary-tree/tree-map.ts +417 -0
- package/src/data-structures/binary-tree/tree-multi-map.ts +467 -325
- package/src/data-structures/binary-tree/tree-multi-set.ts +491 -0
- package/src/data-structures/binary-tree/tree-set.ts +394 -0
- package/src/interfaces/binary-tree.ts +1 -1
- package/src/types/data-structures/binary-tree/index.ts +3 -3
- package/src/types/data-structures/binary-tree/tree-map.ts +39 -0
- package/src/types/data-structures/binary-tree/tree-multi-set.ts +13 -0
- package/src/types/data-structures/binary-tree/tree-set.ts +33 -0
- package/test/config.ts +2 -2
- package/test/performance/benchmark-runner-enhanced.mjs +818 -0
- package/test/performance/cmake-benchmark-runner.mjs +234 -0
- package/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp +112 -0
- package/test/performance/data-structures/binary-tree/avl-rb-range-search.test.mjs +51 -0
- package/test/performance/data-structures/binary-tree/avl-tree.test.cpp +181 -0
- package/test/performance/data-structures/binary-tree/avl-tree.test.mjs +138 -0
- package/test/performance/data-structures/binary-tree/binary-tree-overall.test.mjs +85 -0
- package/test/performance/data-structures/binary-tree/binary-tree.test.mjs +100 -0
- package/test/performance/data-structures/binary-tree/bst.test.mjs +61 -0
- package/test/performance/data-structures/binary-tree/red-black-tree-cjs.test.mjs +259 -0
- package/test/performance/data-structures/binary-tree/red-black-tree.test.cpp +213 -0
- package/test/performance/data-structures/binary-tree/red-black-tree.test.mjs +275 -0
- package/test/performance/data-structures/binary-tree/tree-map.test.cpp +129 -0
- package/test/performance/data-structures/binary-tree/tree-map.test.mjs +171 -0
- package/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp +205 -0
- package/test/performance/data-structures/binary-tree/tree-multi-map.test.mjs +106 -0
- package/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp +217 -0
- package/test/performance/data-structures/binary-tree/tree-multi-set.test.mjs +91 -0
- package/test/performance/data-structures/binary-tree/tree-set.test.cpp +127 -0
- package/test/performance/data-structures/binary-tree/tree-set.test.mjs +174 -0
- package/test/performance/data-structures/comparison/{comparison.test.ts → comparison.test.mjs} +17 -17
- package/test/performance/data-structures/graph/{directed-graph.test.ts → directed-graph.test.mjs} +4 -4
- package/test/performance/data-structures/hash/hash-map.test.cpp +183 -0
- package/test/performance/data-structures/hash/hash-map.test.mjs +187 -0
- package/test/performance/data-structures/heap/heap.test.cpp +61 -0
- package/test/performance/data-structures/heap/heap.test.mjs +31 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp +84 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.mjs +125 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.cpp +77 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.mjs +84 -0
- package/test/performance/data-structures/priority-queue/max-priority-queue.test.mjs +40 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.cpp +59 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.mjs +64 -0
- package/test/performance/data-structures/queue/deque.test.cpp +119 -0
- package/test/performance/data-structures/queue/deque.test.mjs +144 -0
- package/test/performance/data-structures/queue/queue.test.cpp +59 -0
- package/test/performance/data-structures/queue/queue.test.mjs +77 -0
- package/test/performance/data-structures/stack/stack.test.cpp +40 -0
- package/test/performance/data-structures/stack/stack.test.mjs +69 -0
- package/test/performance/data-structures/trie/trie.test.mjs +43 -0
- package/test/performance/reportor-enhanced.mjs +871 -0
- package/test/performance/runner-config.json +33 -21
- package/test/unit/data-structures/base/iterable-element-base.more-branches.coverage.test.ts +6 -6
- package/test/unit/data-structures/base/linear-base.array.coverage.test.ts +5 -5
- package/test/unit/data-structures/base/linear-base.concat-else.coverage.test.ts +10 -10
- package/test/unit/data-structures/base/linear-base.more-branches.coverage.test.ts +7 -10
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +5 -5
- package/test/unit/data-structures/binary-tree/binary-tree.remaining-branches.coverage.test.ts +7 -4
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +7 -7
- package/test/unit/data-structures/binary-tree/bst.more-branches-3.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/bst.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/overall.test.ts +18 -31
- package/test/unit/data-structures/binary-tree/red-black-tree.boundary-max-update.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.cache-stale-insert.coverage.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-mapmode-defined.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-mapmode-undefined.coverage.test.ts +5 -5
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-more.coverage.test.ts +3 -3
- package/test/unit/data-structures/binary-tree/red-black-tree.remaining-branches.coverage.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.set-inputs.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-parent-cache.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-remaining.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-uncovered.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.update-branches.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/tree-map.test.ts +270 -0
- package/test/unit/data-structures/binary-tree/tree-multi-map.coverage.test.ts +144 -3
- package/test/unit/data-structures/binary-tree/{tree-multi-map.test.ts → tree-multi-map.legacy.test.ts.skip} +16 -16
- package/test/unit/data-structures/binary-tree/tree-multi-map.rfc.test.ts +99 -0
- package/test/unit/data-structures/binary-tree/tree-multi-map.simplified.test.ts +482 -0
- package/test/unit/data-structures/binary-tree/tree-multi-set.test.ts +545 -0
- package/test/unit/data-structures/binary-tree/tree-set.test.ts +187 -0
- package/test/unit/unrestricted-interconversion.test.ts +12 -10
- package/test/utils/patch.ts +3 -3
- package/test/utils/perf.mjs +34 -0
- package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -236
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -197
- package/dist/types/data-structures/binary-tree/tree-counter.d.ts +0 -243
- package/dist/types/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -2
- package/dist/types/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -2
- package/dist/types/types/data-structures/binary-tree/tree-counter.d.ts +0 -2
- package/src/data-structures/binary-tree/avl-tree-counter.ts +0 -539
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +0 -438
- package/src/data-structures/binary-tree/tree-counter.ts +0 -587
- package/src/types/data-structures/binary-tree/avl-tree-counter.ts +0 -3
- package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +0 -3
- package/src/types/data-structures/binary-tree/tree-counter.ts +0 -3
- package/test/performance/benchmark-runner.ts +0 -531
- package/test/performance/data-structures/binary-tree/avl-tree.test.ts +0 -40
- package/test/performance/data-structures/binary-tree/binary-tree-overall.test.ts +0 -37
- package/test/performance/data-structures/binary-tree/binary-tree.test.ts +0 -40
- package/test/performance/data-structures/binary-tree/bst.test.ts +0 -28
- package/test/performance/data-structures/binary-tree/red-black-tree.test.ts +0 -60
- package/test/performance/data-structures/hash/hash-map.test.ts +0 -99
- package/test/performance/data-structures/heap/heap.test.ts +0 -26
- package/test/performance/data-structures/heap/min-heap.test.ts +0 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.ts +0 -59
- package/test/performance/data-structures/linked-list/linked-list.test.ts +0 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.ts +0 -35
- package/test/performance/data-structures/linked-list/skip-linked-list.test.ts +0 -0
- package/test/performance/data-structures/linked-list/skip-list.test.ts +0 -0
- package/test/performance/data-structures/matrix/matrix.test.ts +0 -0
- package/test/performance/data-structures/matrix/navigator.test.ts +0 -0
- package/test/performance/data-structures/priority-queue/max-priority-queue.test.ts +0 -17
- package/test/performance/data-structures/priority-queue/min-priority-queue.test.ts +0 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.ts +0 -34
- package/test/performance/data-structures/queue/deque.test.ts +0 -59
- package/test/performance/data-structures/queue/queue.test.ts +0 -35
- package/test/performance/data-structures/stack/stack.test.ts +0 -37
- package/test/performance/data-structures/trie/trie.test.ts +0 -18
- package/test/performance/reportor.ts +0 -279
- package/test/performance/single-suite-runner.ts +0 -72
- package/test/performance/types/index.ts +0 -1
- package/test/performance/types/reportor.ts +0 -7
- package/test/unit/data-structures/binary-tree/avl-tree-counter.more-branches-3.coverage.test.ts +0 -146
- package/test/unit/data-structures/binary-tree/avl-tree-counter.more-branches.coverage.test.ts +0 -93
- package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +0 -878
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.coverage.test.ts +0 -108
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.more-branches-2.coverage.test.ts +0 -85
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +0 -740
- package/test/unit/data-structures/binary-tree/tree-counter.coverage.test.ts +0 -115
- package/test/unit/data-structures/binary-tree/tree-counter.more-branches.coverage.test.ts +0 -244
- package/test/unit/data-structures/binary-tree/tree-counter.test.ts +0 -979
- /package/{test/performance/data-structures/binary-tree/binary-index-tree.test.ts → build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate-complete} +0 -0
- /package/{test/performance/data-structures/binary-tree/segment-tree.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-build} +0 -0
- /package/{test/performance/data-structures/binary-tree/tree-multimap.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-configure} +0 -0
- /package/{test/performance/data-structures/graph/abstract-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-done} +0 -0
- /package/{test/performance/data-structures/graph/map-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-download} +0 -0
- /package/{test/performance/data-structures/graph/overall.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-install} +0 -0
- /package/{test/performance/data-structures/graph/undirected-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-mkdir} +0 -0
- /package/{test/performance/data-structures/hash/hash-table.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-patch} +0 -0
- /package/{test/performance/data-structures/heap/max-heap.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-test} +0 -0
- /package/test/unit/data-structures/binary-tree/{tree-multi-map.more-branches-2.coverage.test.ts → tree-multi-map.more-branches-2.coverage.test.ts.skip} +0 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
|
|
2
|
+
#undef NDEBUG
|
|
3
|
+
#include <cassert>
|
|
4
|
+
#include <vector>
|
|
5
|
+
|
|
6
|
+
#include "../src/check.h" // NOTE: check.h is for internal use only!
|
|
7
|
+
#include "benchmark/benchmark.h"
|
|
8
|
+
|
|
9
|
+
namespace {
|
|
10
|
+
|
|
11
|
+
class TestReporter : public benchmark::ConsoleReporter {
|
|
12
|
+
public:
|
|
13
|
+
bool ReportContext(const Context& context) override {
|
|
14
|
+
return ConsoleReporter::ReportContext(context);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
void ReportRuns(const std::vector<Run>& report) override {
|
|
18
|
+
all_runs_.insert(all_runs_.end(), begin(report), end(report));
|
|
19
|
+
ConsoleReporter::ReportRuns(report);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
TestReporter() {}
|
|
23
|
+
~TestReporter() override {}
|
|
24
|
+
|
|
25
|
+
mutable std::vector<Run> all_runs_;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
struct TestCase {
|
|
29
|
+
std::string name;
|
|
30
|
+
bool error_occurred;
|
|
31
|
+
std::string error_message;
|
|
32
|
+
|
|
33
|
+
typedef benchmark::BenchmarkReporter::Run Run;
|
|
34
|
+
|
|
35
|
+
void CheckRun(Run const& run) const {
|
|
36
|
+
BM_CHECK(name == run.benchmark_name())
|
|
37
|
+
<< "expected " << name << " got " << run.benchmark_name();
|
|
38
|
+
BM_CHECK_EQ(error_occurred,
|
|
39
|
+
benchmark::internal::SkippedWithError == run.skipped);
|
|
40
|
+
BM_CHECK(error_message == run.skip_message);
|
|
41
|
+
if (error_occurred) {
|
|
42
|
+
// BM_CHECK(run.iterations == 0);
|
|
43
|
+
} else {
|
|
44
|
+
BM_CHECK(run.iterations != 0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
std::vector<TestCase> ExpectedResults;
|
|
50
|
+
|
|
51
|
+
int AddCases(const std::string& base_name,
|
|
52
|
+
std::initializer_list<TestCase> const& v) {
|
|
53
|
+
for (auto TC : v) {
|
|
54
|
+
TC.name = base_name + TC.name;
|
|
55
|
+
ExpectedResults.push_back(std::move(TC));
|
|
56
|
+
}
|
|
57
|
+
return 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#define CONCAT(x, y) CONCAT2(x, y)
|
|
61
|
+
#define CONCAT2(x, y) x##y
|
|
62
|
+
#define ADD_CASES(...) int CONCAT(dummy, __LINE__) = AddCases(__VA_ARGS__)
|
|
63
|
+
|
|
64
|
+
} // end namespace
|
|
65
|
+
|
|
66
|
+
void BM_error_no_running(benchmark::State& state) {
|
|
67
|
+
state.SkipWithError("error message");
|
|
68
|
+
}
|
|
69
|
+
BENCHMARK(BM_error_no_running);
|
|
70
|
+
ADD_CASES("BM_error_no_running", {{"", true, "error message"}});
|
|
71
|
+
|
|
72
|
+
void BM_error_before_running(benchmark::State& state) {
|
|
73
|
+
state.SkipWithError("error message");
|
|
74
|
+
while (state.KeepRunning()) {
|
|
75
|
+
assert(false);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
BENCHMARK(BM_error_before_running);
|
|
79
|
+
ADD_CASES("BM_error_before_running", {{"", true, "error message"}});
|
|
80
|
+
|
|
81
|
+
void BM_error_before_running_batch(benchmark::State& state) {
|
|
82
|
+
state.SkipWithError("error message");
|
|
83
|
+
while (state.KeepRunningBatch(17)) {
|
|
84
|
+
assert(false);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
BENCHMARK(BM_error_before_running_batch);
|
|
88
|
+
ADD_CASES("BM_error_before_running_batch", {{"", true, "error message"}});
|
|
89
|
+
|
|
90
|
+
void BM_error_before_running_range_for(benchmark::State& state) {
|
|
91
|
+
state.SkipWithError("error message");
|
|
92
|
+
for (auto _ : state) {
|
|
93
|
+
assert(false);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
BENCHMARK(BM_error_before_running_range_for);
|
|
97
|
+
ADD_CASES("BM_error_before_running_range_for", {{"", true, "error message"}});
|
|
98
|
+
|
|
99
|
+
void BM_error_during_running(benchmark::State& state) {
|
|
100
|
+
int first_iter = true;
|
|
101
|
+
while (state.KeepRunning()) {
|
|
102
|
+
if (state.range(0) == 1 && state.thread_index() <= (state.threads() / 2)) {
|
|
103
|
+
assert(first_iter);
|
|
104
|
+
first_iter = false;
|
|
105
|
+
state.SkipWithError("error message");
|
|
106
|
+
} else {
|
|
107
|
+
state.PauseTiming();
|
|
108
|
+
state.ResumeTiming();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
BENCHMARK(BM_error_during_running)->Arg(1)->Arg(2)->ThreadRange(1, 8);
|
|
113
|
+
ADD_CASES("BM_error_during_running", {{"/1/threads:1", true, "error message"},
|
|
114
|
+
{"/1/threads:2", true, "error message"},
|
|
115
|
+
{"/1/threads:4", true, "error message"},
|
|
116
|
+
{"/1/threads:8", true, "error message"},
|
|
117
|
+
{"/2/threads:1", false, ""},
|
|
118
|
+
{"/2/threads:2", false, ""},
|
|
119
|
+
{"/2/threads:4", false, ""},
|
|
120
|
+
{"/2/threads:8", false, ""}});
|
|
121
|
+
|
|
122
|
+
void BM_error_during_running_ranged_for(benchmark::State& state) {
|
|
123
|
+
assert(state.max_iterations > 3 && "test requires at least a few iterations");
|
|
124
|
+
bool first_iter = true;
|
|
125
|
+
// NOTE: Users should not write the for loop explicitly.
|
|
126
|
+
for (auto It = state.begin(), End = state.end(); It != End; ++It) {
|
|
127
|
+
if (state.range(0) == 1) {
|
|
128
|
+
assert(first_iter);
|
|
129
|
+
first_iter = false;
|
|
130
|
+
(void)first_iter;
|
|
131
|
+
state.SkipWithError("error message");
|
|
132
|
+
// Test the unfortunate but documented behavior that the ranged-for loop
|
|
133
|
+
// doesn't automatically terminate when SkipWithError is set.
|
|
134
|
+
assert(++It != End);
|
|
135
|
+
break; // Required behavior
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
BENCHMARK(BM_error_during_running_ranged_for)->Arg(1)->Arg(2)->Iterations(5);
|
|
140
|
+
ADD_CASES("BM_error_during_running_ranged_for",
|
|
141
|
+
{{"/1/iterations:5", true, "error message"},
|
|
142
|
+
{"/2/iterations:5", false, ""}});
|
|
143
|
+
|
|
144
|
+
void BM_error_after_running(benchmark::State& state) {
|
|
145
|
+
for (auto _ : state) {
|
|
146
|
+
auto iterations = state.iterations();
|
|
147
|
+
benchmark::DoNotOptimize(iterations);
|
|
148
|
+
}
|
|
149
|
+
if (state.thread_index() <= (state.threads() / 2))
|
|
150
|
+
state.SkipWithError("error message");
|
|
151
|
+
}
|
|
152
|
+
BENCHMARK(BM_error_after_running)->ThreadRange(1, 8);
|
|
153
|
+
ADD_CASES("BM_error_after_running", {{"/threads:1", true, "error message"},
|
|
154
|
+
{"/threads:2", true, "error message"},
|
|
155
|
+
{"/threads:4", true, "error message"},
|
|
156
|
+
{"/threads:8", true, "error message"}});
|
|
157
|
+
|
|
158
|
+
void BM_error_while_paused(benchmark::State& state) {
|
|
159
|
+
bool first_iter = true;
|
|
160
|
+
while (state.KeepRunning()) {
|
|
161
|
+
if (state.range(0) == 1 && state.thread_index() <= (state.threads() / 2)) {
|
|
162
|
+
assert(first_iter);
|
|
163
|
+
first_iter = false;
|
|
164
|
+
state.PauseTiming();
|
|
165
|
+
state.SkipWithError("error message");
|
|
166
|
+
} else {
|
|
167
|
+
state.PauseTiming();
|
|
168
|
+
state.ResumeTiming();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
BENCHMARK(BM_error_while_paused)->Arg(1)->Arg(2)->ThreadRange(1, 8);
|
|
173
|
+
ADD_CASES("BM_error_while_paused", {{"/1/threads:1", true, "error message"},
|
|
174
|
+
{"/1/threads:2", true, "error message"},
|
|
175
|
+
{"/1/threads:4", true, "error message"},
|
|
176
|
+
{"/1/threads:8", true, "error message"},
|
|
177
|
+
{"/2/threads:1", false, ""},
|
|
178
|
+
{"/2/threads:2", false, ""},
|
|
179
|
+
{"/2/threads:4", false, ""},
|
|
180
|
+
{"/2/threads:8", false, ""}});
|
|
181
|
+
|
|
182
|
+
int main(int argc, char* argv[]) {
|
|
183
|
+
benchmark::Initialize(&argc, argv);
|
|
184
|
+
|
|
185
|
+
TestReporter test_reporter;
|
|
186
|
+
benchmark::RunSpecifiedBenchmarks(&test_reporter);
|
|
187
|
+
|
|
188
|
+
typedef benchmark::BenchmarkReporter::Run Run;
|
|
189
|
+
auto EB = ExpectedResults.begin();
|
|
190
|
+
|
|
191
|
+
for (Run const& run : test_reporter.all_runs_) {
|
|
192
|
+
assert(EB != ExpectedResults.end());
|
|
193
|
+
EB->CheckRun(run);
|
|
194
|
+
++EB;
|
|
195
|
+
}
|
|
196
|
+
assert(EB == ExpectedResults.end());
|
|
197
|
+
|
|
198
|
+
return 0;
|
|
199
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#include <algorithm>
|
|
2
|
+
#include <cassert>
|
|
3
|
+
#include <cstdint>
|
|
4
|
+
#include <cstdlib>
|
|
5
|
+
#include <cstring>
|
|
6
|
+
#include <iostream>
|
|
7
|
+
#include <limits>
|
|
8
|
+
#include <string>
|
|
9
|
+
#include <vector>
|
|
10
|
+
|
|
11
|
+
#include "benchmark/benchmark.h"
|
|
12
|
+
|
|
13
|
+
// Tests that we can override benchmark-spec value from FLAGS_benchmark_filter
|
|
14
|
+
// with argument to RunSpecifiedBenchmarks(...).
|
|
15
|
+
|
|
16
|
+
namespace {
|
|
17
|
+
|
|
18
|
+
class TestReporter : public benchmark::ConsoleReporter {
|
|
19
|
+
public:
|
|
20
|
+
bool ReportContext(const Context& context) override {
|
|
21
|
+
return ConsoleReporter::ReportContext(context);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
void ReportRuns(const std::vector<Run>& report) override {
|
|
25
|
+
assert(report.size() == 1);
|
|
26
|
+
matched_functions.push_back(report[0].run_name.function_name);
|
|
27
|
+
ConsoleReporter::ReportRuns(report);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
TestReporter() {}
|
|
31
|
+
|
|
32
|
+
~TestReporter() override {}
|
|
33
|
+
|
|
34
|
+
const std::vector<std::string>& GetMatchedFunctions() const {
|
|
35
|
+
return matched_functions;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
std::vector<std::string> matched_functions;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
} // end namespace
|
|
43
|
+
|
|
44
|
+
static void BM_NotChosen(benchmark::State& state) {
|
|
45
|
+
assert(false && "SHOULD NOT BE CALLED");
|
|
46
|
+
for (auto _ : state) {
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
BENCHMARK(BM_NotChosen);
|
|
50
|
+
|
|
51
|
+
static void BM_Chosen(benchmark::State& state) {
|
|
52
|
+
for (auto _ : state) {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
BENCHMARK(BM_Chosen);
|
|
56
|
+
|
|
57
|
+
int main(int argc, char** argv) {
|
|
58
|
+
const std::string flag = "BM_NotChosen";
|
|
59
|
+
|
|
60
|
+
// Verify that argv specify --benchmark_filter=BM_NotChosen.
|
|
61
|
+
bool found = false;
|
|
62
|
+
for (int i = 0; i < argc; ++i) {
|
|
63
|
+
if (strcmp("--benchmark_filter=BM_NotChosen", argv[i]) == 0) {
|
|
64
|
+
found = true;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
assert(found);
|
|
69
|
+
|
|
70
|
+
benchmark::Initialize(&argc, argv);
|
|
71
|
+
|
|
72
|
+
// Check that the current flag value is reported accurately via the
|
|
73
|
+
// GetBenchmarkFilter() function.
|
|
74
|
+
if (flag != benchmark::GetBenchmarkFilter()) {
|
|
75
|
+
std::cerr
|
|
76
|
+
<< "Seeing different value for flags. GetBenchmarkFilter() returns ["
|
|
77
|
+
<< benchmark::GetBenchmarkFilter() << "] expected flag=[" << flag
|
|
78
|
+
<< "]\n";
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
TestReporter test_reporter;
|
|
82
|
+
const char* const spec = "BM_Chosen";
|
|
83
|
+
const size_t returned_count =
|
|
84
|
+
benchmark::RunSpecifiedBenchmarks(&test_reporter, spec);
|
|
85
|
+
assert(returned_count == 1);
|
|
86
|
+
const std::vector<std::string> matched_functions =
|
|
87
|
+
test_reporter.GetMatchedFunctions();
|
|
88
|
+
assert(matched_functions.size() == 1);
|
|
89
|
+
if (strcmp(spec, matched_functions.front().c_str()) != 0) {
|
|
90
|
+
std::cerr << "Expected benchmark [" << spec << "] to run, but got ["
|
|
91
|
+
<< matched_functions.front() << "]\n";
|
|
92
|
+
return 2;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Test that SetBenchmarkFilter works.
|
|
96
|
+
const std::string golden_value = "golden_value";
|
|
97
|
+
benchmark::SetBenchmarkFilter(golden_value);
|
|
98
|
+
std::string current_value = benchmark::GetBenchmarkFilter();
|
|
99
|
+
if (golden_value != current_value) {
|
|
100
|
+
std::cerr << "Expected [" << golden_value
|
|
101
|
+
<< "] for --benchmark_filter but got [" << current_value << "]\n";
|
|
102
|
+
return 3;
|
|
103
|
+
}
|
|
104
|
+
return 0;
|
|
105
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#include <string.h>
|
|
2
|
+
|
|
3
|
+
#include <iostream>
|
|
4
|
+
|
|
5
|
+
#include "benchmark/benchmark.h"
|
|
6
|
+
|
|
7
|
+
// Tests that the user specified verbosity level can be get.
|
|
8
|
+
static void BM_Verbosity(benchmark::State& state) {
|
|
9
|
+
for (auto _ : state) {
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
BENCHMARK(BM_Verbosity);
|
|
13
|
+
|
|
14
|
+
int main(int argc, char** argv) {
|
|
15
|
+
const int32_t flagv = 42;
|
|
16
|
+
|
|
17
|
+
// Verify that argv specify --v=42.
|
|
18
|
+
bool found = false;
|
|
19
|
+
for (int i = 0; i < argc; ++i) {
|
|
20
|
+
if (strcmp("--v=42", argv[i]) == 0) {
|
|
21
|
+
found = true;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (!found) {
|
|
26
|
+
std::cerr << "This test requires '--v=42' to be passed as a command-line "
|
|
27
|
+
<< "argument.\n";
|
|
28
|
+
return 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
benchmark::Initialize(&argc, argv);
|
|
32
|
+
|
|
33
|
+
// Check that the current flag value is reported accurately via the
|
|
34
|
+
// GetBenchmarkVerbosity() function.
|
|
35
|
+
if (flagv != benchmark::GetBenchmarkVerbosity()) {
|
|
36
|
+
std::cerr
|
|
37
|
+
<< "Seeing different value for flags. GetBenchmarkVerbosity() returns ["
|
|
38
|
+
<< benchmark::GetBenchmarkVerbosity() << "] expected flag=[" << flagv
|
|
39
|
+
<< "]\n";
|
|
40
|
+
return 1;
|
|
41
|
+
}
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#include <benchmark/benchmark.h>
|
|
2
|
+
|
|
3
|
+
#ifdef __clang__
|
|
4
|
+
#pragma clang diagnostic ignored "-Wreturn-type"
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
// clang-format off
|
|
8
|
+
extern "C" {
|
|
9
|
+
extern int ExternInt;
|
|
10
|
+
benchmark::State& GetState();
|
|
11
|
+
void Fn();
|
|
12
|
+
}
|
|
13
|
+
// clang-format on
|
|
14
|
+
|
|
15
|
+
using benchmark::State;
|
|
16
|
+
|
|
17
|
+
// CHECK-LABEL: test_for_auto_loop:
|
|
18
|
+
extern "C" int test_for_auto_loop() {
|
|
19
|
+
State& S = GetState();
|
|
20
|
+
int x = 42;
|
|
21
|
+
// CHECK: [[CALL:call(q)*]] _ZN9benchmark5State16StartKeepRunningEv
|
|
22
|
+
// CHECK-NEXT: testq %rbx, %rbx
|
|
23
|
+
// CHECK-NEXT: je [[LOOP_END:.*]]
|
|
24
|
+
|
|
25
|
+
for (auto _ : S) {
|
|
26
|
+
// CHECK: .L[[LOOP_HEAD:[a-zA-Z0-9_]+]]:
|
|
27
|
+
// CHECK-GNU-NEXT: subq $1, %rbx
|
|
28
|
+
// CHECK-CLANG-NEXT: {{(addq \$1, %rax|incq %rax|addq \$-1, %rbx)}}
|
|
29
|
+
// CHECK-NEXT: jne .L[[LOOP_HEAD]]
|
|
30
|
+
benchmark::DoNotOptimize(x);
|
|
31
|
+
}
|
|
32
|
+
// CHECK: [[LOOP_END]]:
|
|
33
|
+
// CHECK: [[CALL]] _ZN9benchmark5State17FinishKeepRunningEv
|
|
34
|
+
|
|
35
|
+
// CHECK: movl $101, %eax
|
|
36
|
+
// CHECK: ret
|
|
37
|
+
return 101;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// CHECK-LABEL: test_while_loop:
|
|
41
|
+
extern "C" int test_while_loop() {
|
|
42
|
+
State& S = GetState();
|
|
43
|
+
int x = 42;
|
|
44
|
+
|
|
45
|
+
// CHECK: j{{(e|mp)}} .L[[LOOP_HEADER:[a-zA-Z0-9_]+]]
|
|
46
|
+
// CHECK-NEXT: .L[[LOOP_BODY:[a-zA-Z0-9_]+]]:
|
|
47
|
+
while (S.KeepRunning()) {
|
|
48
|
+
// CHECK-GNU-NEXT: subq $1, %[[IREG:[a-z]+]]
|
|
49
|
+
// CHECK-CLANG-NEXT: {{(addq \$-1,|decq)}} %[[IREG:[a-z]+]]
|
|
50
|
+
// CHECK: movq %[[IREG]], [[DEST:.*]]
|
|
51
|
+
benchmark::DoNotOptimize(x);
|
|
52
|
+
}
|
|
53
|
+
// CHECK-DAG: movq [[DEST]], %[[IREG]]
|
|
54
|
+
// CHECK-DAG: testq %[[IREG]], %[[IREG]]
|
|
55
|
+
// CHECK-DAG: jne .L[[LOOP_BODY]]
|
|
56
|
+
// CHECK-DAG: .L[[LOOP_HEADER]]:
|
|
57
|
+
|
|
58
|
+
// CHECK: cmpb $0
|
|
59
|
+
// CHECK-NEXT: jne .L[[LOOP_END:[a-zA-Z0-9_]+]]
|
|
60
|
+
// CHECK: [[CALL:call(q)*]] _ZN9benchmark5State16StartKeepRunningEv
|
|
61
|
+
|
|
62
|
+
// CHECK: .L[[LOOP_END]]:
|
|
63
|
+
// CHECK: [[CALL]] _ZN9benchmark5State17FinishKeepRunningEv
|
|
64
|
+
|
|
65
|
+
// CHECK: movl $101, %eax
|
|
66
|
+
// CHECK: ret
|
|
67
|
+
return 101;
|
|
68
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//===---------------------------------------------------------------------===//
|
|
2
|
+
// statistics_test - Unit tests for src/statistics.cc
|
|
3
|
+
//===---------------------------------------------------------------------===//
|
|
4
|
+
|
|
5
|
+
#include "../src/statistics.h"
|
|
6
|
+
#include "gtest/gtest.h"
|
|
7
|
+
|
|
8
|
+
namespace {
|
|
9
|
+
TEST(StatisticsTest, Mean) {
|
|
10
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMean({42, 42, 42, 42}), 42.0);
|
|
11
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMean({1, 2, 3, 4}), 2.5);
|
|
12
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMean({1, 2, 5, 10, 10, 14}), 7.0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
TEST(StatisticsTest, Median) {
|
|
16
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMedian({42, 42, 42, 42}), 42.0);
|
|
17
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMedian({1, 2, 3, 4}), 2.5);
|
|
18
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsMedian({1, 2, 5, 10, 10}), 5.0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
TEST(StatisticsTest, StdDev) {
|
|
22
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsStdDev({101, 101, 101, 101}), 0.0);
|
|
23
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsStdDev({1, 2, 3}), 1.0);
|
|
24
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsStdDev({2.5, 2.4, 3.3, 4.2, 5.1}),
|
|
25
|
+
1.151086443322134);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
TEST(StatisticsTest, CV) {
|
|
29
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({101, 101, 101, 101}), 0.0);
|
|
30
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({1, 2, 3}), 1. / 2.);
|
|
31
|
+
EXPECT_DOUBLE_EQ(benchmark::StatisticsCV({2.5, 2.4, 3.3, 4.2, 5.1}),
|
|
32
|
+
0.32888184094918121);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
} // end namespace
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
//===---------------------------------------------------------------------===//
|
|
2
|
+
// string_util_test - Unit tests for src/string_util.cc
|
|
3
|
+
//===---------------------------------------------------------------------===//
|
|
4
|
+
|
|
5
|
+
#include <tuple>
|
|
6
|
+
|
|
7
|
+
#include "../src/internal_macros.h"
|
|
8
|
+
#include "../src/string_util.h"
|
|
9
|
+
#include "gmock/gmock.h"
|
|
10
|
+
#include "gtest/gtest.h"
|
|
11
|
+
|
|
12
|
+
namespace {
|
|
13
|
+
TEST(StringUtilTest, stoul) {
|
|
14
|
+
{
|
|
15
|
+
size_t pos = 0;
|
|
16
|
+
EXPECT_EQ(0ul, benchmark::stoul("0", &pos));
|
|
17
|
+
EXPECT_EQ(1ul, pos);
|
|
18
|
+
}
|
|
19
|
+
{
|
|
20
|
+
size_t pos = 0;
|
|
21
|
+
EXPECT_EQ(7ul, benchmark::stoul("7", &pos));
|
|
22
|
+
EXPECT_EQ(1ul, pos);
|
|
23
|
+
}
|
|
24
|
+
{
|
|
25
|
+
size_t pos = 0;
|
|
26
|
+
EXPECT_EQ(135ul, benchmark::stoul("135", &pos));
|
|
27
|
+
EXPECT_EQ(3ul, pos);
|
|
28
|
+
}
|
|
29
|
+
#if ULONG_MAX == 0xFFFFFFFFul
|
|
30
|
+
{
|
|
31
|
+
size_t pos = 0;
|
|
32
|
+
EXPECT_EQ(0xFFFFFFFFul, benchmark::stoul("4294967295", &pos));
|
|
33
|
+
EXPECT_EQ(10ul, pos);
|
|
34
|
+
}
|
|
35
|
+
#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFFul
|
|
36
|
+
{
|
|
37
|
+
size_t pos = 0;
|
|
38
|
+
EXPECT_EQ(0xFFFFFFFFFFFFFFFFul,
|
|
39
|
+
benchmark::stoul("18446744073709551615", &pos));
|
|
40
|
+
EXPECT_EQ(20ul, pos);
|
|
41
|
+
}
|
|
42
|
+
#endif
|
|
43
|
+
{
|
|
44
|
+
size_t pos = 0;
|
|
45
|
+
EXPECT_EQ(10ul, benchmark::stoul("1010", &pos, 2));
|
|
46
|
+
EXPECT_EQ(4ul, pos);
|
|
47
|
+
}
|
|
48
|
+
{
|
|
49
|
+
size_t pos = 0;
|
|
50
|
+
EXPECT_EQ(520ul, benchmark::stoul("1010", &pos, 8));
|
|
51
|
+
EXPECT_EQ(4ul, pos);
|
|
52
|
+
}
|
|
53
|
+
{
|
|
54
|
+
size_t pos = 0;
|
|
55
|
+
EXPECT_EQ(1010ul, benchmark::stoul("1010", &pos, 10));
|
|
56
|
+
EXPECT_EQ(4ul, pos);
|
|
57
|
+
}
|
|
58
|
+
{
|
|
59
|
+
size_t pos = 0;
|
|
60
|
+
EXPECT_EQ(4112ul, benchmark::stoul("1010", &pos, 16));
|
|
61
|
+
EXPECT_EQ(4ul, pos);
|
|
62
|
+
}
|
|
63
|
+
{
|
|
64
|
+
size_t pos = 0;
|
|
65
|
+
EXPECT_EQ(0xBEEFul, benchmark::stoul("BEEF", &pos, 16));
|
|
66
|
+
EXPECT_EQ(4ul, pos);
|
|
67
|
+
}
|
|
68
|
+
#ifndef BENCHMARK_HAS_NO_EXCEPTIONS
|
|
69
|
+
{
|
|
70
|
+
ASSERT_THROW(std::ignore = benchmark::stoul("this is a test"),
|
|
71
|
+
std::invalid_argument);
|
|
72
|
+
}
|
|
73
|
+
#endif
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
TEST(StringUtilTest, stoi){{size_t pos = 0;
|
|
77
|
+
EXPECT_EQ(0, benchmark::stoi("0", &pos));
|
|
78
|
+
EXPECT_EQ(1ul, pos);
|
|
79
|
+
} // namespace
|
|
80
|
+
{
|
|
81
|
+
size_t pos = 0;
|
|
82
|
+
EXPECT_EQ(-17, benchmark::stoi("-17", &pos));
|
|
83
|
+
EXPECT_EQ(3ul, pos);
|
|
84
|
+
}
|
|
85
|
+
{
|
|
86
|
+
size_t pos = 0;
|
|
87
|
+
EXPECT_EQ(1357, benchmark::stoi("1357", &pos));
|
|
88
|
+
EXPECT_EQ(4ul, pos);
|
|
89
|
+
}
|
|
90
|
+
{
|
|
91
|
+
size_t pos = 0;
|
|
92
|
+
EXPECT_EQ(10, benchmark::stoi("1010", &pos, 2));
|
|
93
|
+
EXPECT_EQ(4ul, pos);
|
|
94
|
+
}
|
|
95
|
+
{
|
|
96
|
+
size_t pos = 0;
|
|
97
|
+
EXPECT_EQ(520, benchmark::stoi("1010", &pos, 8));
|
|
98
|
+
EXPECT_EQ(4ul, pos);
|
|
99
|
+
}
|
|
100
|
+
{
|
|
101
|
+
size_t pos = 0;
|
|
102
|
+
EXPECT_EQ(1010, benchmark::stoi("1010", &pos, 10));
|
|
103
|
+
EXPECT_EQ(4ul, pos);
|
|
104
|
+
}
|
|
105
|
+
{
|
|
106
|
+
size_t pos = 0;
|
|
107
|
+
EXPECT_EQ(4112, benchmark::stoi("1010", &pos, 16));
|
|
108
|
+
EXPECT_EQ(4ul, pos);
|
|
109
|
+
}
|
|
110
|
+
{
|
|
111
|
+
size_t pos = 0;
|
|
112
|
+
EXPECT_EQ(0xBEEF, benchmark::stoi("BEEF", &pos, 16));
|
|
113
|
+
EXPECT_EQ(4ul, pos);
|
|
114
|
+
}
|
|
115
|
+
#ifndef BENCHMARK_HAS_NO_EXCEPTIONS
|
|
116
|
+
{
|
|
117
|
+
ASSERT_THROW(std::ignore = benchmark::stoi("this is a test"),
|
|
118
|
+
std::invalid_argument);
|
|
119
|
+
}
|
|
120
|
+
#endif
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
TEST(StringUtilTest, stod){{size_t pos = 0;
|
|
124
|
+
EXPECT_EQ(0.0, benchmark::stod("0", &pos));
|
|
125
|
+
EXPECT_EQ(1ul, pos);
|
|
126
|
+
}
|
|
127
|
+
{
|
|
128
|
+
size_t pos = 0;
|
|
129
|
+
EXPECT_EQ(-84.0, benchmark::stod("-84", &pos));
|
|
130
|
+
EXPECT_EQ(3ul, pos);
|
|
131
|
+
}
|
|
132
|
+
{
|
|
133
|
+
size_t pos = 0;
|
|
134
|
+
EXPECT_EQ(1234.0, benchmark::stod("1234", &pos));
|
|
135
|
+
EXPECT_EQ(4ul, pos);
|
|
136
|
+
}
|
|
137
|
+
{
|
|
138
|
+
size_t pos = 0;
|
|
139
|
+
EXPECT_EQ(1.5, benchmark::stod("1.5", &pos));
|
|
140
|
+
EXPECT_EQ(3ul, pos);
|
|
141
|
+
}
|
|
142
|
+
{
|
|
143
|
+
size_t pos = 0;
|
|
144
|
+
/* Note: exactly representable as double */
|
|
145
|
+
EXPECT_EQ(-1.25e+9, benchmark::stod("-1.25e+9", &pos));
|
|
146
|
+
EXPECT_EQ(8ul, pos);
|
|
147
|
+
}
|
|
148
|
+
#ifndef BENCHMARK_HAS_NO_EXCEPTIONS
|
|
149
|
+
{
|
|
150
|
+
ASSERT_THROW(std::ignore = benchmark::stod("this is a test"),
|
|
151
|
+
std::invalid_argument);
|
|
152
|
+
}
|
|
153
|
+
#endif
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
TEST(StringUtilTest, StrSplit) {
|
|
157
|
+
EXPECT_EQ(benchmark::StrSplit("", ','), std::vector<std::string>{});
|
|
158
|
+
EXPECT_EQ(benchmark::StrSplit("hello", ','),
|
|
159
|
+
std::vector<std::string>({"hello"}));
|
|
160
|
+
EXPECT_EQ(benchmark::StrSplit("hello,there,is,more", ','),
|
|
161
|
+
std::vector<std::string>({"hello", "there", "is", "more"}));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
using HumanReadableFixture = ::testing::TestWithParam<
|
|
165
|
+
std::tuple<double, benchmark::Counter::OneK, std::string>>;
|
|
166
|
+
|
|
167
|
+
INSTANTIATE_TEST_SUITE_P(
|
|
168
|
+
HumanReadableTests, HumanReadableFixture,
|
|
169
|
+
::testing::Values(
|
|
170
|
+
std::make_tuple(0.0, benchmark::Counter::kIs1024, "0"),
|
|
171
|
+
std::make_tuple(999.0, benchmark::Counter::kIs1024, "999"),
|
|
172
|
+
std::make_tuple(1000.0, benchmark::Counter::kIs1024, "1000"),
|
|
173
|
+
std::make_tuple(1024.0, benchmark::Counter::kIs1024, "1Ki"),
|
|
174
|
+
std::make_tuple(1000 * 1000.0, benchmark::Counter::kIs1024,
|
|
175
|
+
"976\\.56.Ki"),
|
|
176
|
+
std::make_tuple(1024 * 1024.0, benchmark::Counter::kIs1024, "1Mi"),
|
|
177
|
+
std::make_tuple(1000 * 1000 * 1000.0, benchmark::Counter::kIs1024,
|
|
178
|
+
"953\\.674Mi"),
|
|
179
|
+
std::make_tuple(1024 * 1024 * 1024.0, benchmark::Counter::kIs1024,
|
|
180
|
+
"1Gi"),
|
|
181
|
+
std::make_tuple(0.0, benchmark::Counter::kIs1000, "0"),
|
|
182
|
+
std::make_tuple(999.0, benchmark::Counter::kIs1000, "999"),
|
|
183
|
+
std::make_tuple(1000.0, benchmark::Counter::kIs1000, "1k"),
|
|
184
|
+
std::make_tuple(1024.0, benchmark::Counter::kIs1000, "1.024k"),
|
|
185
|
+
std::make_tuple(1000 * 1000.0, benchmark::Counter::kIs1000, "1M"),
|
|
186
|
+
std::make_tuple(1024 * 1024.0, benchmark::Counter::kIs1000,
|
|
187
|
+
"1\\.04858M"),
|
|
188
|
+
std::make_tuple(1000 * 1000 * 1000.0, benchmark::Counter::kIs1000,
|
|
189
|
+
"1G"),
|
|
190
|
+
std::make_tuple(1024 * 1024 * 1024.0, benchmark::Counter::kIs1000,
|
|
191
|
+
"1\\.07374G")));
|
|
192
|
+
|
|
193
|
+
TEST_P(HumanReadableFixture, HumanReadableNumber) {
|
|
194
|
+
std::string str = benchmark::HumanReadableNumber(std::get<0>(GetParam()),
|
|
195
|
+
std::get<1>(GetParam()));
|
|
196
|
+
ASSERT_THAT(str, ::testing::MatchesRegex(std::get<2>(GetParam())));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
} // end namespace
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
#include <cassert>
|
|
3
|
+
#include <memory>
|
|
4
|
+
|
|
5
|
+
#include "benchmark/benchmark.h"
|
|
6
|
+
|
|
7
|
+
template <typename T>
|
|
8
|
+
class MyFixture : public ::benchmark::Fixture {
|
|
9
|
+
public:
|
|
10
|
+
MyFixture() : data(0) {}
|
|
11
|
+
|
|
12
|
+
T data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
BENCHMARK_TEMPLATE_F(MyFixture, Foo, int)(benchmark::State& st) {
|
|
16
|
+
for (auto _ : st) {
|
|
17
|
+
data += 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark::State& st) {
|
|
22
|
+
for (auto _ : st) {
|
|
23
|
+
data += 1.0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
BENCHMARK_REGISTER_F(MyFixture, Bar);
|
|
27
|
+
|
|
28
|
+
BENCHMARK_MAIN();
|