Skip to content

Commit

Permalink
Transform perf results into mark-down table
Browse files Browse the repository at this point in the history
  • Loading branch information
big-andy-coates committed Oct 10, 2023
1 parent 53d23b9 commit 0fdb1aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-perf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Perf Test

on:
workflow_dispatch:
pull_request:
branches: [ main ]

permissions:
contents: read
Expand All @@ -19,11 +21,15 @@ jobs:
with:
java-version: '17'
distribution: 'adopt'
- name: Install pandoc # used for latex to markdown conversion
run: |
sudo apt-get update
sudo apt-get pandoc
- name: Setup Gradle
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
with:
gradle-home-cache-cleanup: true
- name: Run
run: |
./gradlew runBenchmarks
cat benchmark_results.txt >> $GITHUB_STEP_SUMMARY
pandoc benchmark_results.csv -t gfm >> $GITHUB_STEP_SUMMARY
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ tasks.register<JavaExec>("runBenchmarks") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("org.creekservice.kafka.test.perf.BenchmarkRunner")
args(listOf(
// Output results in text format
"-rf", "text",
// Output results in csv format
"-rf", "csv",
// To a named file
"-rff", "benchmark_results.txt"
"-rff", "benchmark_results.csv"
))
dependsOn(pullTask)
}
Expand All @@ -146,7 +146,7 @@ val benchmarkSmokeTest = tasks.register<JavaExec>("runBenchmarkSmokeTest") {
"-t", "1",
// Running for 1 second
"-r", "1s",
// With forking disabled
// With forking disabled, i.e. in-process
"-f", "0"
))
dependsOn(pullTask)
Expand Down

0 comments on commit 0fdb1aa

Please sign in to comment.