@@ -35,6 +35,25 @@ 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_environment (g_hooks, " C++ Compiler" , " compiler_id" ,
42+ CODSPEED_CXX_COMPILER_ID);
43+ #endif
44+ #ifdef CODSPEED_CXX_COMPILER_VERSION
45+ instrument_hooks_set_environment (g_hooks, " C++ Compiler" , " version" ,
46+ CODSPEED_CXX_COMPILER_VERSION);
47+ #endif
48+ #ifdef CODSPEED_CXX_COMPILER_FULL_VERSION
49+ instrument_hooks_set_environment (g_hooks, " C++ Compiler" , " build" ,
50+ CODSPEED_CXX_COMPILER_FULL_VERSION);
51+ #endif
52+ #ifdef CODSPEED_BUILD_TYPE
53+ instrument_hooks_set_environment (g_hooks, " C++ Compiler" , " build_type" ,
54+ CODSPEED_BUILD_TYPE);
55+ #endif
56+ instrument_hooks_write_environment (g_hooks, static_cast <uint32_t >(getpid ()));
3857}
3958
4059ALWAYS_INLINE void measurement_start () {
@@ -55,7 +74,7 @@ ALWAYS_INLINE uint64_t measurement_current_timestamp() {
5574}
5675
5776ALWAYS_INLINE uint8_t measurement_add_marker (uint8_t marker_type,
58- uint64_t timestamp) {
77+ uint64_t timestamp) {
5978 auto pid = static_cast <uint32_t >(getpid ());
6079 return instrument_hooks_add_marker (g_hooks, pid, marker_type, timestamp);
6180}
0 commit comments