Skip to content

Commit

Permalink
clone the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi committed May 8, 2024
1 parent c15bf6f commit c81f83b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ jobs:
mkdir -p ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala
cp ./zio-http/zio-http-example/src/main/scala/example/PlainTextBenchmarkServer.scala ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala/Main.scala
cd ./FrameworkBenchMarks
sed -i "s/---COMMIT_SHA---/${{github.event.pull_request.head.repo.owner.login}}\/zio-http.git#${{github.event.pull_request.head.sha}}/g" frameworks/Scala/zio-http/build.sbt
cd ./frameworks/Scala/zio-http
git clone https://github.com/${{github.event.pull_request.head.repo.owner.login}}/zio-http.git
cd zio-http
git checkout ${{github.event.pull_request.head.sha}}
cd ../../../..
./tfb --test zio-http | tee result
RESULT_REQUEST=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "requests/sec: [0-9]+.[0-9]+" | grep -oiE "[0-9]+" | head -1)
RESULT_CONCURRENCY=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "concurrency: [0-9]+" | grep -oiE "[0-9]+")
Expand Down Expand Up @@ -189,7 +193,11 @@ jobs:
mkdir -p ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala
cp ./zio-http/zio-http-example/src/main/scala/example/SimpleEffectBenchmarkServer.scala ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala/Main.scala
cd ./FrameworkBenchMarks
sed -i "s/---COMMIT_SHA---/${{github.event.pull_request.head.repo.owner.login}}\/zio-http.git#${{github.event.pull_request.head.sha}}/g" frameworks/Scala/zio-http/build.sbt
cd ./frameworks/Scala/zio-http
git clone https://github.com/${{github.event.pull_request.head.repo.owner.login}}/zio-http.git
cd zio-http
git checkout ${{github.event.pull_request.head.sha}}
cd ../../../..
./tfb --test zio-http | tee result
RESULT_REQUEST=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "requests/sec: [0-9]+.[0-9]+" | grep -oiE "[0-9]+" | head -1)
RESULT_CONCURRENCY=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "concurrency: [0-9]+" | grep -oiE "[0-9]+")
Expand Down
6 changes: 5 additions & 1 deletion project/BenchmarkWorkFlow.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ object BenchmarkWorkFlow {
"mkdir -p ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala",
s"cp ./zio-http/zio-http-example/src/main/scala/example/${server}.scala ./FrameworkBenchMarks/frameworks/Scala/zio-http/src/main/scala/Main.scala",
"cd ./FrameworkBenchMarks",
"""sed -i "s/---COMMIT_SHA---/${{github.event.pull_request.head.repo.owner.login}}\/zio-http.git#${{github.event.pull_request.head.sha}}/g" frameworks/Scala/zio-http/build.sbt""",
"cd ./frameworks/Scala/zio-http",
"git clone https://github.com/${{github.event.pull_request.head.repo.owner.login}}/zio-http.git",
"cd zio-http",
"git checkout ${{github.event.pull_request.head.sha}}",
"cd ../../../..",
"./tfb --test zio-http | tee result",
"""RESULT_REQUEST=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "requests/sec: [0-9]+.[0-9]+" | grep -oiE "[0-9]+" | head -1)""",
"""RESULT_CONCURRENCY=$(echo $(grep -B 1 -A 17 "Concurrency: 256 for plaintext" result) | grep -oiE "concurrency: [0-9]+" | grep -oiE "[0-9]+")""",
Expand Down

0 comments on commit c81f83b

Please sign in to comment.