@@ -35,6 +35,21 @@ inline bool measurement_is_instrumented() {
3535inline void measurement_set_metadata () {
3636 std::string version = get_version ();
3737 instrument_hooks_set_integration (g_hooks, " codspeed-cpp" , version.c_str ());
38+
39+ // Report C++ toolchain information
40+ #ifdef CODSPEED_CXX_COMPILER_ID
41+ instrument_hooks_set_toolchain (" cpp" , " compiler_id" , CODSPEED_CXX_COMPILER_ID);
42+ #endif
43+ #ifdef CODSPEED_CXX_COMPILER_VERSION
44+ instrument_hooks_set_toolchain (" cpp" , " version" , CODSPEED_CXX_COMPILER_VERSION);
45+ #endif
46+ #ifdef CODSPEED_CXX_COMPILER_FULL_VERSION
47+ instrument_hooks_set_toolchain (" cpp" , " build" , CODSPEED_CXX_COMPILER_FULL_VERSION);
48+ #endif
49+ #ifdef CODSPEED_BUILD_TYPE
50+ instrument_hooks_set_toolchain (" cpp" , " build_type" , CODSPEED_BUILD_TYPE);
51+ #endif
52+ instrument_hooks_write_environment ();
3853}
3954
4055ALWAYS_INLINE void measurement_start () {
@@ -54,9 +69,9 @@ ALWAYS_INLINE uint64_t measurement_current_timestamp() {
5469 return instrument_hooks_current_timestamp ();
5570}
5671
57- ALWAYS_INLINE int8_t measurement_add_marker (uint8_t marker_type,
58- uint64_t timestamp) {
59- auto pid = getpid ();
72+ ALWAYS_INLINE uint8_t measurement_add_marker (uint8_t marker_type,
73+ uint64_t timestamp) {
74+ auto pid = static_cast < uint32_t >( getpid () );
6075 return instrument_hooks_add_marker (g_hooks, pid, marker_type, timestamp);
6176}
6277
0 commit comments