Skip to content

Commit b34600c

Browse files
fixup! feat(core): allow measurement through codspeed core library
1 parent 213d0e2 commit b34600c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

core/CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
cmake_minimum_required(VERSION 3.10)
22

3-
set(CODSPEED_VERSION 1.0)
3+
set(CODSPEED_VERSION 1.0.0)
44

5-
project(
6-
codspeed
7-
VERSION ${CODSPEED_VERSION}
8-
LANGUAGES CXX)
5+
project(codspeed VERSION ${CODSPEED_VERSION} LANGUAGES CXX)
96

107
# Specify the C++ standard
118
set(CMAKE_CXX_STANDARD 17)
@@ -22,8 +19,8 @@ add_compile_definitions(CODSPEED_VERSION="${CODSPEED_VERSION}")
2219

2320
# Disable valgrind compilation errors
2421
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
25-
# Disable the old-style-cast warning for the specific target
26-
target_compile_options(codspeed PRIVATE -Wno-old-style-cast)
22+
# Disable the old-style-cast warning for the specific target
23+
target_compile_options(codspeed PRIVATE -Wno-old-style-cast)
2724
endif()
2825

2926
# Specify the include directories for users of the library

core/src/codspeed.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ std::string join(const std::vector<std::string> &elements,
1818

1919
CodSpeed::CodSpeed() : is_instrumented(measurement_is_instrumented()) {
2020
if (!is_instrumented) {
21-
std::cout
21+
std::cerr
2222
<< "NOTICE: codspeed is enabled, but no performance measurement will "
2323
"be made since it's running in an unknown environment."
2424
<< std::endl;
@@ -48,6 +48,6 @@ void CodSpeed::end_benchmark() {
4848
std::string action_str = is_instrumented ? "Measured" : "Checked";
4949
std::string group_str =
5050
group_stack.empty() ? "" : " (group: " + join(group_stack, "/") + ")";
51-
std::cout << action_str << ": " << current_benchmark << group_str
51+
std::cerr << action_str << ": " << current_benchmark << group_str
5252
<< std::endl;
5353
}

0 commit comments

Comments
 (0)