Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3a6e79e
Add comprehensive benchmark suite for CTRACK
May 28, 2025
dcfbad0
Add benchmark documentation to README.md and update .gitignore
May 28, 2025
39aebe3
Refactor JSON parsing and timestamp retrieval in load_baseline and ge…
Compaile Jun 8, 2025
be4740c
Implement new feature for user authentication and improve error handling
Compaile Jun 8, 2025
3c63e14
Refactor benchmark code for improved readability and maintainability;…
Compaile Jun 8, 2025
a3948c5
Add new template function for distinct field value extraction and ref…
Compaile Jun 8, 2025
9053fc4
improve metric change indicators
Compaile Jun 8, 2025
6028e5a
Add /build_wsl/ to .gitignore to exclude WSL build directory from ver…
Compaile Jun 8, 2025
bbeff2b
reduce memory usage by avoiding nested maps
Compaile Jun 8, 2025
c840c4f
Enhance distinct field value counting by using unordered_set for impr…
Compaile Jun 8, 2025
299ca67
Refactor code structure for improved readability and maintainability
Compaile Aug 14, 2025
e5bc728
Adjust overhead comparison to use absolute values and optimize event …
Compaile Aug 14, 2025
4120a9d
Add serialization demo example and enhance ctrack with file save/load…
Compaile Aug 15, 2025
7d69667
revert some debugging changes
Compaile Aug 15, 2025
cae717d
Add structured result tables for enhanced performance metrics and rep…
Compaile Aug 15, 2025
8a6e28c
Enhance performance metrics by adding summary fields for active exclu…
Compaile Aug 15, 2025
ec6204b
Add comprehensive unit tests for ctrack functionality
Compaile Aug 20, 2025
a5f7376
Increase sleep times in multithreaded tests and adjust percentile tes…
Compaile Aug 20, 2025
f9d4935
Refactor code formatting for improved readability in ctrack.hpp
Compaile Sep 2, 2025
e4ff236
Add changelog for version 1.1.0 with new features, performance improv…
Compaile Sep 29, 2025
dbae67f
Enhance README with scope-based tracking examples and direct data acc…
Compaile Sep 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 62 additions & 53 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,62 @@
# Build directory
/build/

# CMake generated files
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
Makefile

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# IDE-specific files (uncomment if needed)
# .vscode/
# .idea/
# *.swp
# *.swo

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Build directory
/build/
/build_wsl/

# CMake generated files
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
Makefile

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# IDE-specific files (uncomment if needed)
# .vscode/
# .idea/
# *.swp
# *.swo

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Local documentation
CLAUDE.local.md
CLAUDE.md
settings.json
Testing/Temporary/LastTest.log
Testing/Temporary/CTestCostData.txt
.claude/settings.local.json
199 changes: 111 additions & 88 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,89 +1,112 @@
cmake_minimum_required(VERSION 3.12)
project(ctrack VERSION 1.0.2 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Option to disable parallel processing
option(DISABLE_PAR "Disable parallel processing" OFF)

# Option to disable building examples
option(DISABLE_EXAMPLES "Disable building examples" OFF)

option(ENABLE_WARNINGS "Enable warnings" OFF)

# Check for TBB
if(NOT MSVC AND NOT DISABLE_PAR)
find_package(TBB QUIET)
if(TBB_FOUND)
message(STATUS "TBB found. Enabling parallel execution.")
else()
message(STATUS "TBB not found. Disabling parallel execution.")
set(DISABLE_PAR ON)
endif()
elseif(DISABLE_PAR)
message(STATUS "DISABLE_PAR set. Disabling parallel execution.")
endif()

# Create the ctrack library
add_library(ctrack INTERFACE)
target_include_directories(ctrack INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

# Configure ctrack based on TBB availability
if(DISABLE_PAR)
target_compile_definitions(ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
elseif(NOT MSVC AND TBB_FOUND)
target_link_libraries(ctrack INTERFACE TBB::tbb)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(ENABLE_WARNINGS)
if (NOT MSVC)
include(cmake/add_warning.cmake)
include(cmake/warnings.cmake)
endif()
endif()

# Add the examples subdirectory if not disabled
if(NOT DISABLE_EXAMPLES)
add_subdirectory(examples)
else()
message(STATUS "Building examples disabled.")
endif()

# Installation
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

install(TARGETS ctrack
EXPORT ctrackTargets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(EXPORT ctrackTargets
FILE ctrackTargets.cmake
NAMESPACE ctrack::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
)

configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
)

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
cmake_minimum_required(VERSION 3.12)
project(ctrack VERSION 1.0.2 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Option to disable parallel processing
option(DISABLE_PAR "Disable parallel processing" OFF)

# Option to disable building examples
option(DISABLE_EXAMPLES "Disable building examples" OFF)

# Option to build benchmark (default OFF)
option(BUILD_BENCHMARK "Build benchmark" OFF)

# Option to build tests (default OFF)
option(BUILD_TESTS "Build tests" OFF)

option(ENABLE_WARNINGS "Enable warnings" OFF)

# Check for TBB
if(NOT MSVC AND NOT DISABLE_PAR)
find_package(TBB QUIET)
if(TBB_FOUND)
message(STATUS "TBB found. Enabling parallel execution.")
else()
message(STATUS "TBB not found. Disabling parallel execution.")
set(DISABLE_PAR ON)
endif()
elseif(DISABLE_PAR)
message(STATUS "DISABLE_PAR set. Disabling parallel execution.")
endif()

# Create the ctrack library
add_library(ctrack INTERFACE)
target_include_directories(ctrack INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

# Configure ctrack based on TBB availability
if(DISABLE_PAR)
target_compile_definitions(ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
elseif(NOT MSVC AND TBB_FOUND)
target_link_libraries(ctrack INTERFACE TBB::tbb)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(ENABLE_WARNINGS)
if (NOT MSVC)
include(cmake/add_warning.cmake)
include(cmake/warnings.cmake)
endif()
endif()

# Add the examples subdirectory if not disabled
if(NOT DISABLE_EXAMPLES)
add_subdirectory(examples)
else()
message(STATUS "Building examples disabled.")
endif()

# Add the benchmark subdirectory if enabled
if(BUILD_BENCHMARK)
add_subdirectory(benchmark)
message(STATUS "Building benchmark enabled.")
else()
message(STATUS "Building benchmark disabled.")
endif()

# Add the test subdirectory if enabled
if(BUILD_TESTS)
add_subdirectory(test)
enable_testing()
message(STATUS "Building tests enabled.")
else()
message(STATUS "Building tests disabled.")
endif()

# Installation
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

install(TARGETS ctrack
EXPORT ctrackTargets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(EXPORT ctrackTargets
FILE ctrackTargets.cmake
NAMESPACE ctrack::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
)

configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
)

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ctrackConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ctrack
)
34 changes: 17 additions & 17 deletions Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/ctrackTargets.cmake")

if(NOT MSVC AND NOT CTRACK_DISABLE_EXECUTION_POLICY)
include(CMakeFindDependencyMacro)
find_dependency(TBB QUIET)
if(NOT TBB_FOUND)
message(STATUS "TBB not found. Disabling parallel execution for ctrack.")
set(CTRACK_DISABLE_EXECUTION_POLICY ON)
endif()
endif()

if(CTRACK_DISABLE_EXECUTION_POLICY)
target_compile_definitions(ctrack::ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
endif()

@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/ctrackTargets.cmake")
if(NOT MSVC AND NOT CTRACK_DISABLE_EXECUTION_POLICY)
include(CMakeFindDependencyMacro)
find_dependency(TBB QUIET)
if(NOT TBB_FOUND)
message(STATUS "TBB not found. Disabling parallel execution for ctrack.")
set(CTRACK_DISABLE_EXECUTION_POLICY ON)
endif()
endif()
if(CTRACK_DISABLE_EXECUTION_POLICY)
target_compile_definitions(ctrack::ctrack INTERFACE CTRACK_DISABLE_EXECUTION_POLICY)
endif()
check_required_components(ctrack)
40 changes: 20 additions & 20 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2024 COMPAILE Solutions GmbH - Grischa Hauser

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
MIT License
Copyright (c) 2024 COMPAILE Solutions GmbH - Grischa Hauser
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading