Skip to content

Commit

Permalink
fix: cpu info
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Dec 7, 2022
1 parent 9899a8a commit d24e6bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bench/include/kotlin-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion bench/tool/CpuInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override string ToString()

public static bool TryParse(string rawText, out CpuInfo cpuInfo)
{
Match match = Regex.Match(rawText, @"^Architecture:(?<arch>.+?)\s*$[^.$]*?^CPU\(s\):\s*(?<core>\d+)\s*$[^.$]*?^Model:\s*(?<model>\d+)\s*$\s*^Model name:\s*(?<name>.+?)$", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase);
Match match = Regex.Match(rawText, @"^Architecture:\s*(?<arch>.+?)\s*$[^.$]*?^CPU\(s\):\s*(?<core>\d+)\s*$[^.$]*?^Model name:\s*(?<name>.+?)$[^.$]*?^Model:\s*(?<model>\d+)\s*$", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase);
if (match.Success)
{
cpuInfo = new CpuInfo
Expand Down

0 comments on commit d24e6bc

Please sign in to comment.