mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
chore: add dfly_bench to release workflow (#5045)
* upload dfly_bench binaries on every release * fix macos failing build Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
65f94e5d82
commit
ad946d8e06
3 changed files with 14 additions and 4 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -43,6 +43,7 @@ jobs:
|
||||||
./tools/release.sh
|
./tools/release.sh
|
||||||
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64
|
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64
|
||||||
mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/
|
mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -50,6 +51,7 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
${{ env.RELEASE_DIR }}/dragonfly-*tar.gz
|
${{ env.RELEASE_DIR }}/dragonfly-*tar.gz
|
||||||
${{ env.RELEASE_DIR }}/dragonfly_*.deb
|
${{ env.RELEASE_DIR }}/dragonfly_*.deb
|
||||||
|
${{ env.RELEASE_DIR }}/dfly_bench
|
||||||
|
|
||||||
build-native:
|
build-native:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -81,6 +83,7 @@ jobs:
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
git describe --always --tags ${{ github.sha }}
|
git describe --always --tags ${{ github.sha }}
|
||||||
./tools/release.sh
|
./tools/release.sh
|
||||||
|
|
||||||
# once the build is over, we want to generate a Debian package
|
# once the build is over, we want to generate a Debian package
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64
|
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64
|
||||||
|
@ -108,6 +111,8 @@ jobs:
|
||||||
ls -l *.rpm
|
ls -l *.rpm
|
||||||
mv ./*.rpm ./results-artifacts/
|
mv ./*.rpm ./results-artifacts/
|
||||||
fi
|
fi
|
||||||
|
mv ${{ env.RELEASE_DIR }}/dfly_bench results-artifacts
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -34,7 +34,7 @@ configure:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cd $(RELEASE_DIR); \
|
cd $(RELEASE_DIR); \
|
||||||
ninja dragonfly && ldd dragonfly
|
ninja dfly_bench dragonfly && ldd dragonfly
|
||||||
|
|
||||||
package:
|
package:
|
||||||
cd $(RELEASE_DIR); \
|
cd $(RELEASE_DIR); \
|
||||||
|
|
|
@ -229,14 +229,19 @@ template <clockid_t cid> void BM_ClockType(benchmark::State& state) {
|
||||||
DoNotOptimize(clock_gettime(cid, &ts));
|
DoNotOptimize(clock_gettime(cid, &ts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_REALTIME);
|
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);
|
||||||
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_PROCESS_CPUTIME_ID);
|
||||||
BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_THREAD_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);
|
BENCHMARK_TEMPLATE(BM_ClockType, CLOCK_BOOTTIME_ALARM);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void BM_MatchGlob(benchmark::State& state) {
|
static void BM_MatchGlob(benchmark::State& state) {
|
||||||
string random_val = GetRandomHex(state.range(0));
|
string random_val = GetRandomHex(state.range(0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue