This repository was archived by the owner on Jul 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +48
-24
lines changed Expand file tree Collapse file tree 7 files changed +48
-24
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ test_script:
33
33
}
34
34
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_benchmark.exe" | ForEach-Object {
35
35
Write-Output $_.FullName
36
-
36
+
37
37
& $_.FullName
38
38
}
39
39
Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ fetchcontent_declare(prometheus
30
30
GIT_TAG
31
31
master )
32
32
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 )
37
37
38
38
fetchcontent_getproperties (googletest )
39
39
if (BUILD_TESTING )
@@ -80,7 +80,10 @@ endif()
80
80
81
81
fetchcontent_getproperties (benchmark )
82
82
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 )
84
86
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 )
86
89
endif ()
Original file line number Diff line number Diff line change @@ -42,13 +42,12 @@ endfunction()
42
42
#
43
43
# opencensus_benchmark(trace_some_test internal/some_test.cc dep1 dep2...)
44
44
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()
52
51
endfunction ()
53
52
54
53
# Helper function like bazel's cc_library. Libraries are namespaced as
Original file line number Diff line number Diff line change @@ -31,4 +31,5 @@ opencensus_test(context_context_test
31
31
32
32
opencensus_test (context_with_context_test internal /with_context_test.cc context )
33
33
34
- opencensus_benchmark (context_context_benchmark internal /context_benchmark.cc context )
34
+ opencensus_benchmark (context_context_benchmark internal /context_benchmark.cc
35
+ context )
Original file line number Diff line number Diff line change @@ -116,4 +116,10 @@ opencensus_test(stats_view_data_impl_test
116
116
stats_core
117
117
absl::time )
118
118
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 )
Original file line number Diff line number Diff line change @@ -57,4 +57,7 @@ opencensus_test(tags_with_tag_map_test
57
57
tags_with_tag_map
58
58
context )
59
59
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 )
Original file line number Diff line number Diff line change @@ -190,16 +190,28 @@ opencensus_test(trace_with_span_test
190
190
trace_with_span
191
191
context )
192
192
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 )
194
195
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 )
196
199
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 )
198
202
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 )
200
207
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 )
202
210
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 )
204
213
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 )
You can’t perform that action at this time.
0 commit comments