Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit d375a97

Browse files
committed
formatting
1 parent e722336 commit d375a97

File tree

7 files changed

+48
-24
lines changed

7 files changed

+48
-24
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test_script:
3333
}
3434
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_benchmark.exe" | ForEach-Object {
3535
Write-Output $_.FullName
36-
36+
3737
& $_.FullName
3838
}
3939

cmake/OpenCensusDeps.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ fetchcontent_declare(prometheus
3030
GIT_TAG
3131
master)
3232
fetchcontent_declare(benchmark
33-
GIT_REPOSITORY
34-
https://github.com/google/benchmark
35-
GIT_TAG
36-
master)
33+
GIT_REPOSITORY
34+
https://github.com/google/benchmark
35+
GIT_TAG
36+
master)
3737

3838
fetchcontent_getproperties(googletest)
3939
if(BUILD_TESTING)
@@ -80,7 +80,10 @@ endif()
8080

8181
fetchcontent_getproperties(benchmark)
8282
if(NOT benchmark_POPULATED)
83-
set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Enable building the unit tests which depend on gtest" FORCE)
83+
set(BENCHMARK_ENABLE_GTEST_TESTS OFF
84+
CACHE BOOL "Enable building the unit tests which depend on gtest"
85+
FORCE)
8486
fetchcontent_populate(benchmark)
85-
add_subdirectory(${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR} EXCLUDE_FROM_ALL)
87+
add_subdirectory(${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR}
88+
EXCLUDE_FROM_ALL)
8689
endif()

cmake/OpenCensusHelpers.cmake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ endfunction()
4242
#
4343
# opencensus_benchmark(trace_some_test internal/some_test.cc dep1 dep2...)
4444
function(opencensus_benchmark NAME SRC)
45-
#if(BUILD_TESTING)
46-
set(_NAME "opencensus_${NAME}")
47-
add_executable(${_NAME} ${SRC})
48-
prepend_opencensus(DEPS "${ARGN}")
49-
target_link_libraries(${_NAME} "${DEPS}" benchmark)
50-
#add_test(NAME ${_NAME} COMMAND ${_NAME})
51-
#endif()
45+
# if(BUILD_TESTING)
46+
set(_NAME "opencensus_${NAME}")
47+
add_executable(${_NAME} ${SRC})
48+
prepend_opencensus(DEPS "${ARGN}")
49+
target_link_libraries(${_NAME} "${DEPS}" benchmark)
50+
# add_test(NAME ${_NAME} COMMAND ${_NAME}) endif()
5251
endfunction()
5352

5453
# Helper function like bazel's cc_library. Libraries are namespaced as

opencensus/context/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ opencensus_test(context_context_test
3131

3232
opencensus_test(context_with_context_test internal/with_context_test.cc context)
3333

34-
opencensus_benchmark(context_context_benchmark internal/context_benchmark.cc context)
34+
opencensus_benchmark(context_context_benchmark internal/context_benchmark.cc
35+
context)

opencensus/stats/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,10 @@ opencensus_test(stats_view_data_impl_test
116116
stats_core
117117
absl::time)
118118

119-
opencensus_benchmark(stats_stats_manager_benchmark internal/stats_manager_benchmark.cc stats_core stats_recording absl::memory absl::strings absl::time)
119+
opencensus_benchmark(stats_stats_manager_benchmark
120+
internal/stats_manager_benchmark.cc
121+
stats_core
122+
stats_recording
123+
absl::memory
124+
absl::strings
125+
absl::time)

opencensus/tags/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ opencensus_test(tags_with_tag_map_test
5757
tags_with_tag_map
5858
context)
5959

60-
opencensus_benchmark(tags_tag_map_benchmark internal/tag_map_benchmark.cc tags absl::strings)
60+
opencensus_benchmark(tags_tag_map_benchmark
61+
internal/tag_map_benchmark.cc
62+
tags
63+
absl::strings)

opencensus/trace/CMakeLists.txt

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,28 @@ opencensus_test(trace_with_span_test
190190
trace_with_span
191191
context)
192192

193-
opencensus_benchmark(trace_attribute_value_ref_benchmark internal/attribute_value_ref_benchmark.cc trace)
193+
opencensus_benchmark(trace_attribute_value_ref_benchmark
194+
internal/attribute_value_ref_benchmark.cc trace)
194195

195-
opencensus_benchmark(trace_cloud_trace_context_benchmark internal/cloud_trace_context_benchmark.cc trace_cloud_trace_context)
196+
opencensus_benchmark(trace_cloud_trace_context_benchmark
197+
internal/cloud_trace_context_benchmark.cc
198+
trace_cloud_trace_context)
196199

197-
opencensus_benchmark(trace_grpc_trace_bin_benchmark internal/grpc_trace_bin_benchmark.cc trace_grpc_trace_bin)
200+
opencensus_benchmark(trace_grpc_trace_bin_benchmark
201+
internal/grpc_trace_bin_benchmark.cc trace_grpc_trace_bin)
198202

199-
opencensus_benchmark(trace_span_benchmark internal/span_benchmark.cc trace_span_context trace)
203+
opencensus_benchmark(trace_span_benchmark
204+
internal/span_benchmark.cc
205+
trace_span_context
206+
trace)
200207

201-
opencensus_benchmark(trace_span_id_benchmark internal/span_id_benchmark.cc trace_span_context)
208+
opencensus_benchmark(trace_span_id_benchmark internal/span_id_benchmark.cc
209+
trace_span_context)
202210

203-
opencensus_benchmark(trace_context_benchmark internal/trace_context_benchmark.cc trace_trace_context)
211+
opencensus_benchmark(trace_context_benchmark internal/trace_context_benchmark.cc
212+
trace_trace_context)
204213

205-
opencensus_benchmark(trace_with_span_benchmark internal/with_span_benchmark.cc trace trace_with_span)
214+
opencensus_benchmark(trace_with_span_benchmark
215+
internal/with_span_benchmark.cc
216+
trace
217+
trace_with_span)

0 commit comments

Comments
 (0)