Skip to content

Commit c4a793c

Browse files
committed
feat: add thread count display for different OS in allocator benchmark scripts
1 parent 791d88a commit c4a793c

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/scripts/allocator_bench_alpine.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ docker run --rm \
6262

6363
{
6464
echo "### ${PLATFORM_LABEL:-unknown} (tokio-multi-thread=${TOKIO_MULTI_THREAD:-false})"
65+
echo "Threads: $(nproc --all)"
6566
echo ""
6667
echo "| Allocator | Peak KB | Major PF | Minor PF |"
6768
echo "| --- | ---: | ---: | ---: |"

.github/scripts/allocator_bench_unix.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ done
8888

8989
{
9090
echo "### ${PLATFORM_LABEL:-unknown} (tokio-multi-thread=${TOKIO_MULTI_THREAD:-false})"
91+
if [[ "$RUNNER_OS" == "Linux" ]]; then
92+
echo "Threads: $(nproc --all)"
93+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
94+
echo "Threads: $(sysctl -n hw.logicalcpu)"
95+
elif [[ "$RUNNER_OS" == "Windows" ]]; then
96+
echo "Threads: $NUMBER_OF_PROCESSORS"
97+
fi
9198
echo ""
9299
echo "| Allocator | Peak KB | Major PF | Minor PF |"
93100
echo "| --- | ---: | ---: | ---: |"

.github/scripts/allocator_bench_windows.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ foreach ($allocator in $allocators) {
4747

4848
$summary = @()
4949
$summary += "### $($env:PLATFORM_LABEL) (tokio-multi-thread=$tokioOn)"
50+
$summary += "Threads: $($env:NUMBER_OF_PROCESSORS)"
5051
$summary += ""
5152
$summary += "| Allocator | Peak KB | Page Faults |"
5253
$summary += "| --- | ---: | ---: |"

0 commit comments

Comments
 (0)