From d24e6bc2aab3529cb0c432aa83b573de461cd658 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Thu, 8 Dec 2022 01:58:11 +0800 Subject: [PATCH] fix: cpu info --- .github/workflows/bench.yml | 11 ++++++----- bench/include/kotlin-jvm/build.gradle.kts | 3 ++- bench/tool/CpuInfo.cs | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index a1c2de734..b59f74f4e 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -259,11 +259,8 @@ jobs: pushd bench dotnet run -c Release --project tool -- --task checkcpu popd - - uses: actions/download-artifact@v3 - with: - name: build - path: bench/build/ - run: ./.github/acton.sh + - run: ./.github/clang.sh - run: ./.github/dotnet.sh # - run: ./.github/graalvm.sh # - run: ./.github/graalvm-node.sh @@ -276,7 +273,7 @@ jobs: - run: ./.github/lua.sh # - run: ./.github/racket.sh - run: ./.github/hashlink.sh - - run: ./.github/hhvm.sh + # - run: ./.github/hhvm.sh # - run: sudo ./.github/dart.sh - uses: shogo82148/actions-setup-perl@v1 with: @@ -295,6 +292,10 @@ jobs: with: ruby-version: 3 # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - uses: actions/download-artifact@v3 + with: + name: build + path: bench/build/ - name: Bench run: | source $PROFILE diff --git a/bench/include/kotlin-jvm/build.gradle.kts b/bench/include/kotlin-jvm/build.gradle.kts index 2c514a5e8..1c84911a2 100644 --- a/bench/include/kotlin-jvm/build.gradle.kts +++ b/bench/include/kotlin-jvm/build.gradle.kts @@ -31,7 +31,8 @@ dependencies { // implementation("org.slf4j:slf4j-api:1.7.36") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1") - val ktor_version = "2.1.3" + implementation("org.jetbrains.kotlinx:atomicfu:0.18.5") + val ktor_version = "2.2.0" implementation("io.ktor:ktor-server-core:$ktor_version") // implementation("io.ktor:ktor-server-netty:$ktor_version") implementation("io.ktor:ktor-server-cio:$ktor_version") diff --git a/bench/tool/CpuInfo.cs b/bench/tool/CpuInfo.cs index a65e05ba4..5fde9ce69 100644 --- a/bench/tool/CpuInfo.cs +++ b/bench/tool/CpuInfo.cs @@ -23,7 +23,7 @@ public override string ToString() public static bool TryParse(string rawText, out CpuInfo cpuInfo) { - Match match = Regex.Match(rawText, @"^Architecture:(?.+?)\s*$[^.$]*?^CPU\(s\):\s*(?\d+)\s*$[^.$]*?^Model:\s*(?\d+)\s*$\s*^Model name:\s*(?.+?)$", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase); + Match match = Regex.Match(rawText, @"^Architecture:\s*(?.+?)\s*$[^.$]*?^CPU\(s\):\s*(?\d+)\s*$[^.$]*?^Model name:\s*(?.+?)$[^.$]*?^Model:\s*(?\d+)\s*$", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase); if (match.Success) { cpuInfo = new CpuInfo