diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8064ae67..efc03fff1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,6 +43,7 @@ jobs: ./tools/release.sh ./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64 mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/ + - name: Upload uses: actions/upload-artifact@v4 with: @@ -50,6 +51,7 @@ jobs: path: | ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz ${{ env.RELEASE_DIR }}/dragonfly_*.deb + ${{ env.RELEASE_DIR }}/dfly_bench build-native: runs-on: ubuntu-latest @@ -81,6 +83,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE" git describe --always --tags ${{ github.sha }} ./tools/release.sh + # once the build is over, we want to generate a Debian package if [ -f /etc/debian_version ]; then ./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64 @@ -108,6 +111,8 @@ jobs: ls -l *.rpm mv ./*.rpm ./results-artifacts/ fi + mv ${{ env.RELEASE_DIR }}/dfly_bench results-artifacts + - name: Upload uses: actions/upload-artifact@v4 with: diff --git a/Makefile b/Makefile index 5cf62d2bb..908806873 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ configure: build: cd $(RELEASE_DIR); \ - ninja dragonfly && ldd dragonfly + ninja dfly_bench dragonfly && ldd dragonfly package: cd $(RELEASE_DIR); \ diff --git a/src/core/dfly_core_test.cc b/src/core/dfly_core_test.cc index 5ecb5ca41..c08900451 100644 --- a/src/core/dfly_core_test.cc +++ b/src/core/dfly_core_test.cc @@ -229,14 +229,19 @@ template void BM_ClockType(benchmark::State& state) { DoNotOptimize(clock_gettime(cid, &ts)); } } + BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_REALTIME); -BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_REALTIME_COARSE); BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_MONOTONIC); -BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_MONOTONIC_COARSE); -BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_BOOTTIME); BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_PROCESS_CPUTIME_ID); BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_THREAD_CPUTIME_ID); + +// These clocks are not available on apple platform +#if !defined(__APPLE__) +BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_REALTIME_COARSE); +BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_MONOTONIC_COARSE); +BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_BOOTTIME); BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_BOOTTIME_ALARM); +#endif static void BM_MatchGlob(benchmark::State& state) { string random_val = GetRandomHex(state.range(0));