From c4a793ce69c46ec3cb854eaef2a7d84a20cd1c41 Mon Sep 17 00:00:00 2001 From: monosans Date: Thu, 30 Apr 2026 19:55:38 +0300 Subject: [PATCH] feat: add thread count display for different OS in allocator benchmark scripts --- .github/scripts/allocator_bench_alpine.sh | 1 + .github/scripts/allocator_bench_unix.sh | 7 +++++++ .github/scripts/allocator_bench_windows.ps1 | 1 + 3 files changed, 9 insertions(+) diff --git a/.github/scripts/allocator_bench_alpine.sh b/.github/scripts/allocator_bench_alpine.sh index 5b9e2e3..55f2ee4 100755 --- a/.github/scripts/allocator_bench_alpine.sh +++ b/.github/scripts/allocator_bench_alpine.sh @@ -62,6 +62,7 @@ docker run --rm \ { echo "### ${PLATFORM_LABEL:-unknown} (tokio-multi-thread=${TOKIO_MULTI_THREAD:-false})" + echo "Threads: $(nproc --all)" echo "" echo "| Allocator | Peak KB | Major PF | Minor PF |" echo "| --- | ---: | ---: | ---: |" diff --git a/.github/scripts/allocator_bench_unix.sh b/.github/scripts/allocator_bench_unix.sh index d9dcdd0..b7ff2dd 100755 --- a/.github/scripts/allocator_bench_unix.sh +++ b/.github/scripts/allocator_bench_unix.sh @@ -88,6 +88,13 @@ done { echo "### ${PLATFORM_LABEL:-unknown} (tokio-multi-thread=${TOKIO_MULTI_THREAD:-false})" + if [[ "$RUNNER_OS" == "Linux" ]]; then + echo "Threads: $(nproc --all)" + elif [[ "$RUNNER_OS" == "macOS" ]]; then + echo "Threads: $(sysctl -n hw.logicalcpu)" + elif [[ "$RUNNER_OS" == "Windows" ]]; then + echo "Threads: $NUMBER_OF_PROCESSORS" + fi echo "" echo "| Allocator | Peak KB | Major PF | Minor PF |" echo "| --- | ---: | ---: | ---: |" diff --git a/.github/scripts/allocator_bench_windows.ps1 b/.github/scripts/allocator_bench_windows.ps1 index 6575686..4bd4551 100644 --- a/.github/scripts/allocator_bench_windows.ps1 +++ b/.github/scripts/allocator_bench_windows.ps1 @@ -47,6 +47,7 @@ foreach ($allocator in $allocators) { $summary = @() $summary += "### $($env:PLATFORM_LABEL) (tokio-multi-thread=$tokioOn)" +$summary += "Threads: $($env:NUMBER_OF_PROCESSORS)" $summary += "" $summary += "| Allocator | Peak KB | Page Faults |" $summary += "| --- | ---: | ---: |"