Skip to content

Commit 7495758

Browse files
committed
ENH: Add benchmark for iterator loop comparison
Added precommit hook to automatically run clang-format.
1 parent 7f3c0d9 commit 7495758

File tree

3 files changed

+403
-0
lines changed

3 files changed

+403
-0
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .pre-commit-config.yaml
2+
# for details see https://pre-commit.com
3+
# for list of available hooks see https://pre-commit.com/hooks.html
4+
#
5+
# Preclude commits that do not conform to various criteria.
6+
#
7+
# If a pre-commit check must be skipped then use: `SKIP=check_id git commit` Where `check_id` is the id of the check to
8+
# be skipped such as `black`.
9+
10+
fail_fast: true
11+
default_stages: [pre-commit]
12+
repos:
13+
- repo: https://github.com/pre-commit/mirrors-clang-format
14+
rev: v19.1.7
15+
hooks:
16+
- id: clang-format
17+
args: ['--style=file']
18+
files: '\.(c|cc|h|cxx|hxx)$'

examples/Core/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,14 @@ add_test(
1818
set_property(TEST ThreadOverheadBenchmark APPEND PROPERTY LABELS Core)
1919
## performance tests should not be run in parallel
2020
set_tests_properties(ThreadOverheadBenchmark PROPERTIES RUN_SERIAL TRUE)
21+
22+
add_executable(ImageIterationBenchmark itkImageIterationBenchmark.cxx )
23+
target_link_libraries(ImageIterationBenchmark ${ITK_LIBRARIES})
24+
add_test(
25+
NAME ImageIterationBenchmark
26+
COMMAND ImageIterationBenchmark
27+
${BENCHMARK_RESULTS_OUTPUT_DIR}/__DATESTAMP__ImageIterationBenchmark.json
28+
50 128 )
29+
set_property(TEST ImageIterationBenchmark APPEND PROPERTY LABELS Core)
30+
## performance tests should not be run in parallel
31+
set_tests_properties(ImageIterationBenchmark PROPERTIES RUN_SERIAL TRUE)

0 commit comments

Comments
 (0)