Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #32

Merged
merged 98 commits into from
Feb 4, 2024
Merged

Dev #32

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
825f64a
Fix major bug with sending multiple HttpConnectionService messages
Oipo Dec 8, 2023
e60d611
Expand etcd example
Oipo Dec 8, 2023
7eaa5e6
Add auth management to Etcd V2 implementation
Oipo Dec 13, 2023
76c5206
Fix Etcd compilation issues on non-gcc compilers, fix createUser resp…
Oipo Dec 13, 2023
25ee59b
Make Any noexcept
Oipo Dec 23, 2023
b09f34e
Remove redundant usage of Filter{...} in examples
Oipo Dec 23, 2023
e0ab648
Add to_string() to Any, by default requires values to have an fmt::fo…
Oipo Dec 24, 2023
4da2a19
Update sole to latest
Oipo Dec 24, 2023
c68b600
Remove multimap, different definition between absl and std
Oipo Dec 24, 2023
4290ddc
Add introspection example and expanded ways to introspect dependencies
Oipo Dec 24, 2023
ed613e6
Add non-atomic reference counted smart pointer to STL
Oipo Dec 26, 2023
08f79a6
Add security related linker flags when using hardening
Oipo Dec 27, 2023
fdc8a40
Allow requesting multiple dependencies with the same interface
Oipo Dec 28, 2023
f97f122
Rename tracker example to factory example
Oipo Dec 28, 2023
b015df7
Refactor requesting multiple of same dependency
Oipo Dec 28, 2023
c1fa3c4
Add extra test for multiple required deps
Oipo Dec 28, 2023
93b655b
Fix compiling with position indepedent code
Oipo Jan 5, 2024
55e5a99
Fix realtime example when SMT missing
Oipo Jan 5, 2024
af2bf9f
Fix realtime example and remove sanitizers for musl
Oipo Jan 6, 2024
e7beb64
Fix compilation on OSX, apple has different linker flags
Oipo Jan 6, 2024
2e946ac
Fix fix the last fix (typo in apple linker flags)
Oipo Jan 6, 2024
ea067e5
Fix bug in calculating averages that threw away metrics
Oipo Jan 7, 2024
13d4ff6
Support setting priority lower than normal to ensure services start i…
Oipo Jan 7, 2024
42cb4a3
Refactor boost services into their own directory
Oipo Jan 7, 2024
56923a8
Improve performance for starting services with dependencies and inter…
Oipo Jan 8, 2024
8f2fe05
Fix nullptr issue
Oipo Jan 8, 2024
4ec8acd
Fix clang-tidy warning
Oipo Jan 8, 2024
afc83df
Update benchmarks README.md
Oipo Jan 8, 2024
4105be8
Always use ankerl's unordered_dense maps as it is one of the best imp…
Oipo Jan 9, 2024
00b94c7
Do not use CXX debug definitions when compiling with RelWithDebInfo
Oipo Jan 9, 2024
eba32f0
Fix using an iterator after it was invalidated
Oipo Jan 9, 2024
289c275
Remove static-pie, as combining it with static-libstdc++ leads to seg…
Oipo Jan 13, 2024
2d6de3e
Add regex with capture groups capability to http implementation
Oipo Jan 17, 2024
f524441
Add SBO to Ichor::any
Oipo Jan 18, 2024
9c7cda9
Reduce memory usage of events by moving type and name into virtual fu…
Oipo Jan 18, 2024
ff9585e
Replace MultimapQueue with PriorityQueue, to drastically reduce memor…
Oipo Jan 19, 2024
3cba7ee
exclude running tcp_example on simulated Aarch64
Oipo Jan 19, 2024
5d07912
Improve performance by not use ReferenceCountedPointer in processing …
Oipo Jan 19, 2024
a2416bc
Rename DELETE because a windows header defines a macro with the same …
Oipo Jan 20, 2024
aacf776
Fix potential out-of-order handling messing up a ServicesTest
Oipo Jan 20, 2024
a6406cb
Add support for force compiling with libc++ when using clang
Oipo Jan 22, 2024
7c9eeae
Update cmake requirement to 3.22 due to various CMPs
Oipo Jan 22, 2024
76d0ef9
Merge DependencyInfo into DependencyRegister
Oipo Jan 22, 2024
6d3058a
Forcibly turn off libcpp in CI
Oipo Jan 22, 2024
b29192f
Disable sanitizers by default in non-debug modes
Oipo Jan 22, 2024
7f5215c
Separate advanced and constructor injection benchmark
Oipo Jan 22, 2024
7bbc3a1
Add introspection of provided interfaces for services
Oipo Jan 22, 2024
0a2ad40
Add source fortify to hardening flags
Oipo Jan 22, 2024
49f7725
Workaround cmake for unsetting builtin compiler definitions
Oipo Jan 22, 2024
bb9df6a
Also add hardening flags to Catch2
Oipo Jan 22, 2024
c99e649
Allow introspecting of trackers
Oipo Jan 24, 2024
5ac056b
Compile 3rd party libs in Dockerfiles with extra security flags
Oipo Jan 25, 2024
9ca28d5
Fix data race for empty dependency optimization
Oipo Jan 25, 2024
a0ce3e8
Update benchmark numbers
Oipo Jan 25, 2024
a99cdeb
Fix typo in Any
Oipo Jan 25, 2024
f9e1ea6
Fix NULL deref in PriorityQueue
Oipo Jan 25, 2024
a418dd2
Enable mimalloc secure mode when hardening enabled
Oipo Jan 25, 2024
9df3ca3
Add CI internal debug libcpp variant
Oipo Jan 25, 2024
d82c0fd
Have benchmarks run with reduced iterations in internal debug mode
Oipo Jan 25, 2024
3891a50
Run benchmarks in build.sh and add quick compile check with libcpp
Oipo Jan 25, 2024
af89696
Put some includes used for internal debug mode behind ifdefs
Oipo Jan 25, 2024
dc5913f
Fix new CI pipeline
Oipo Jan 25, 2024
af3b53b
Update fmt and spdlog
Oipo Jan 26, 2024
f9b5fff
Update Catch2
Oipo Jan 26, 2024
d037c53
Update glaze
Oipo Jan 26, 2024
070a601
Some warning fixes
Oipo Jan 26, 2024
7e4e7f7
Update aarch64 Dockerfiles to use latest alpine
Oipo Jan 26, 2024
7689886
Remove duplicate code paths in Any
Oipo Jan 26, 2024
c309e25
Ensure tests completing properly on slower virtual machines
Oipo Jan 26, 2024
ec6158f
Cannot unset ENV vars in Dockerfiles, unset in CMD instead
Oipo Jan 26, 2024
9ddbccb
Update mimalloc, allows using it with sanitizers, musl and aarch64
Oipo Jan 26, 2024
a0b5329
Fix bug and reduce code bloat with typeName<T>()
Oipo Jan 28, 2024
a271734
Fix new typename on msvc
Oipo Jan 28, 2024
6f1314c
Refactor DependencyFlags to enum class
Oipo Jan 30, 2024
e2335c2
Rename and make constexpr the FastAtoi functions
Oipo Jan 30, 2024
b7b1a83
Fix compilation on CI
Oipo Jan 30, 2024
fdddba8
Enable Mold linker in CI
Oipo Jan 30, 2024
c0f4902
Revert enabling mold
Oipo Jan 30, 2024
4134f7d
Update coverage CI build
Oipo Jan 30, 2024
5be95d0
Expand redis service and refactor things into StringUtils STL
Oipo Jan 31, 2024
454ee0d
Fixed tsan dockerfile and fix a threading issue
Oipo Feb 1, 2024
29b85d1
Thread names on linux only have 15 usable characters, remove whitespa…
Oipo Feb 1, 2024
ccfb7c6
Improve Dockerfiles
Oipo Feb 1, 2024
9a87ae3
Remove useless error field in HttpResponse
Oipo Feb 2, 2024
91257cc
Add some docs on setting up an Http Server
Oipo Feb 2, 2024
f7e8e5a
Improve reconnection for HttpConnections and therefore for EtcdService.
Oipo Feb 2, 2024
de873fd
Reduce properties lookups
Oipo Feb 2, 2024
9a3e314
Fix any casting the wrong property
Oipo Feb 2, 2024
006b935
Add file/lineno printing to CoutLogger and copy basename function fro…
Oipo Feb 2, 2024
6e9c62f
Also run tsan dockerfile in build.sh
Oipo Feb 2, 2024
dd34d0b
Set priority of coroutines in all cases
Oipo Feb 2, 2024
d6a0bbe
Update benchmark numbers to reflect using mimalloc secure mode
Oipo Feb 2, 2024
5eaa3c3
Using libcpp is broken on CI
Oipo Feb 2, 2024
8fd1f4e
-fstack-clash-protection is not available on aarch64
Oipo Feb 2, 2024
995b669
Enable benchmarks for coverage
Oipo Feb 2, 2024
ac02fbe
Fix basename util function on windows
Oipo Feb 2, 2024
d26d466
Enable internal debugging for coverage so that benchmarks actually fi…
Oipo Feb 2, 2024
5972676
Revert coverage build back to g++, as gcov and g++ need to be the sam…
Oipo Feb 4, 2024
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
41 changes: 41 additions & 0 deletions .github/workflows/cmake-internal-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CMake

on:
workflow_dispatch:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: "Configure CMake"
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: CC=clang-18 CXX=clang++-18 cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DICHOR_USE_SANITIZERS=OFF -DICHOR_USE_BOOST_BEAST=ON -DICHOR_USE_SDEVENT=ON -DICHOR_USE_MOLD=ON -DICHOR_ENABLE_INTERNAL_DEBUGGING=ON -DICHOR_ENABLE_INTERNAL_COROUTINE_DEBUGGING=ON -DICHOR_ENABLE_INTERNAL_IO_DEBUGGING=ON -DICHOR_ENABLE_INTERNAL_STL_DEBUGGING=ON -DICHOR_USE_LIBCPP=OFF

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Debug

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}

- name: Examples
working-directory: ${{github.workspace}}/bin
run: ../bin/ichor_etcd_example && ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_factory_example && ../bin/ichor_websocket_example && ../bin/ichor_websocket_example -t4 && ../bin/ichor_yielding_timer_example && ../bin/ichor_event_statistics_example && ../bin/ichor_introspection_example && ../bin/ichor_coroutine_benchmark && ../bin/ichor_event_benchmark && ../bin/ichor_serializer_benchmark && ../bin/ichor_start_benchmark && ../bin/ichor_start_stop_benchmark && ../bin/ichor_utils_benchmark -r

7 changes: 3 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
matrix:
compiler: [/opt/gcc-11.3/bin/g++, clang++]
spdlog: [ON, OFF]
absl: [ON, OFF]
opts: [Debug, Release]
sanitizer: [asan] #tsan not yet supported due to missing sanitizer implementation in GCC 10, 11. As well as false positives. See:
# - https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=80b4ce1a5190ebe764b1009afae57dcef45f92c2
Expand All @@ -36,13 +35,13 @@ jobs:
if: ${{matrix.sanitizer == 'asan'}}
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: CXX=${{matrix.compiler}} cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.opts}} -DICHOR_USE_SPDLOG=${{matrix.spdlog}} -DICHOR_USE_ABSEIL=${{matrix.absl}} -DICHOR_USE_BOOST_BEAST=ON -DICHOR_USE_SDEVENT=ON -DICHOR_USE_MOLD=OFF
run: CXX=${{matrix.compiler}} cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.opts}} -DICHOR_USE_SPDLOG=${{matrix.spdlog}} -DICHOR_USE_BOOST_BEAST=ON -DICHOR_USE_SDEVENT=ON -DICHOR_USE_MOLD=OFF -DICHOR_USE_LIBCPP=OFF

- name: "Configure CMake (spdlog:${{matrix.spdlog}}, tsan)"
if: ${{matrix.sanitizer == 'tsan'}}
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: CXX=${{matrix.compiler}} cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.opts}} -DICHOR_USE_SPDLOG=${{matrix.spdlog}} -DICHOR_USE_ABSEIL=${{matrix.absl}} -DICHOR_USE_BOOST_BEAST=ON -DICHOR_USE_SDEVENT=ON -DICHOR_USE_SANITIZERS=OFF -DICHOR_USE_THREAD_SANITIZER=ON -DICHOR_USE_MOLD=OFF
run: CXX=${{matrix.compiler}} cmake -GNinja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.opts}} -DICHOR_USE_SPDLOG=${{matrix.spdlog}} -DICHOR_USE_BOOST_BEAST=ON -DICHOR_USE_SDEVENT=ON -DICHOR_USE_SANITIZERS=OFF -DICHOR_USE_THREAD_SANITIZER=ON -DICHOR_USE_MOLD=OFF -DICHOR_USE_LIBCPP=OFF

- name: Build
# Build your program with the given configuration
Expand All @@ -56,5 +55,5 @@ jobs:

- name: Examples
working-directory: ${{github.workspace}}/bin
run: ../bin/ichor_etcd_example && ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_tracker_example && ../bin/ichor_websocket_example && ../bin/ichor_websocket_example -t4 && ../bin/ichor_yielding_timer_example && ../bin/ichor_event_statistics_example
run: ../bin/ichor_etcd_example && ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_factory_example && ../bin/ichor_websocket_example && ../bin/ichor_websocket_example -t4 && ../bin/ichor_yielding_timer_example && ../bin/ichor_event_statistics_example && ../bin/ichor_introspection_example

6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build:
runs-on: self-hosted
runs-on: coverage

steps:
- uses: actions/checkout@v3
Expand All @@ -24,7 +24,7 @@ jobs:
run: echo "/opt/gcc-11.3/bin" >> $GITHUB_PATH

- name: "Configure CMake"
run: cmake -GNinja -B ${{github.workspace}}/build-coverage -DCMAKE_BUILD_TYPE=Debug -DICHOR_USE_BOOST_BEAST=ON -DICHOR_BUILD_COVERAGE=ON -DICHOR_USE_HIREDIS=ON -DICHOR_USE_SANITIZERS=OFF -DICHOR_BUILD_BENCHMARKS=OFF
run: cmake -GNinja -B ${{github.workspace}}/build-coverage -DCMAKE_BUILD_TYPE=Debug -DICHOR_USE_BOOST_BEAST=ON -DICHOR_BUILD_COVERAGE=ON -DICHOR_USE_HIREDIS=ON -DICHOR_USE_SANITIZERS=OFF -DICHOR_USE_LIBCPP=OFF -DICHOR_USE_MOLD=OFF -DICHOR_ENABLE_INTERNAL_DEBUGGING=ON

- name: Build
run: cmake --build ${{github.workspace}}/build-coverage --config Debug
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Examples
working-directory: ${{github.workspace}}/bin
run: ../bin/ichor_etcd_example && ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_tracker_example && ../bin/ichor_websocket_example && ../bin/ichor_yielding_timer_example && ../bin/ichor_event_statistics_example
run: ../bin/ichor_etcd_example && ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_factory_example && ../bin/ichor_websocket_example && ../bin/ichor_yielding_timer_example && ../bin/ichor_event_statistics_example && ../bin/ichor_introspection_example && ../bin/ichor_coroutine_benchmark && ../bin/ichor_event_benchmark && ../bin/ichor_serializer_benchmark && ../bin/ichor_start_benchmark && ../bin/ichor_start_stop_benchmark && ../bin/ichor_utils_benchmark -r

- name: coverage
run: lcov --directory . --capture --output-file coverage.info && lcov --remove coverage.info '/usr/*' '/opt/*' '${{github.workspace}}/external/*' --output-file coverage.info && lcov --list coverage.info && codecov -f coverage.info
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
branch = 7.1.2
[submodule "external/mimalloc"]
path = external/mimalloc
url = https://github.com/microsoft/mimalloc.git
url = https://github.com/volt-software/mimalloc-static.git
[submodule "external/glaze"]
path = external/glaze
url = https://github.com/stephenberry/glaze.git
Loading
Loading