Skip to content

Commit

Permalink
Transform perf results into mark-down table (#35)
Browse files Browse the repository at this point in the history
* Transform perf results into mark-down table

* fix indentation

* fix pandoc installation

* use pandoc via docker image

* set from format

* update to version of pandoc with csv support

* clean up todos
  • Loading branch information
big-andy-coates authored Oct 10, 2023
1 parent 53d23b9 commit 123c722
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-func-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ name: Func Test

on:
workflow_dispatch:
push:
branches: [ main ]

concurrency:
group: ${{ github.ref }}-func-test
cancel-in-progress: true

permissions:
contents: read
Expand All @@ -23,5 +29,5 @@ jobs:
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
with:
gradle-home-cache-cleanup: true
- name: Run
- name: Run functional tests
run: ./gradlew --quiet runFunctionalTests >> $GITHUB_STEP_SUMMARY
22 changes: 18 additions & 4 deletions .github/workflows/run-perf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ name: Perf Test

on:
workflow_dispatch:
push:
branches: [ main ]

concurrency:
group: ${{ github.ref }}-perf-test
cancel-in-progress: true

permissions:
contents: read
Expand All @@ -23,7 +29,15 @@ jobs:
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
- name: Run performance benchmarks
run: ./gradlew runBenchmarks
- name: Convert results to markdown
uses: docker://pandoc/core:3.1
with:
args: >-
--from=csv
--to=gfm
--output=benchmark_results.md
benchmark_results.csv
- name: Upload results
run: cat benchmark_results.md >> $GITHUB_STEP_SUMMARY
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
implementation("io.vertx:vertx-json-schema:$vertxVersion")
compileOnly("io.vertx:vertx-codegen:$vertxVersion")

implementation("net.jimblackler.jsonschemafriend:core:0.11.4")
implementation("net.jimblackler.jsonschemafriend:core:0.12.2")

implementation("com.networknt:json-schema-validator:1.0.80"){
exclude(group = "org.apache.commons", module = "commons-lang3")
Expand Down 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 123c722

Please sign in to comment.