Skip to content

Commit

Permalink
Remove text & protobuf format from benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendseeker committed Sep 26, 2024
1 parent 95edec7 commit 4ecd7ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,24 @@ jobs:
if: ${{ matrix.jobtype == 6 }}
shell: bash
run: |
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "zincBenchmarks/Jmh/clean" "runBenchmarks"
- name: Checkout Target Branch (4, 5)
if: ${{ github.event_name == 'pull_request' && (matrix.jobtype == 4 || matrix.jobtype == 5) }}
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "runBenchmarks"
- name: Checkout Target Branch (4-6)
if: ${{ github.event_name == 'pull_request' && (matrix.jobtype >= 4 || matrix.jobtype <= 6) }}
uses: actions/checkout@v4
with:
clean: false
ref: ${{ github.event.pull_request.base.ref }}
- name: Benchmark (Scalac) against Target Branch (4)
if: ${{ github.event_name == 'pull_request' && matrix.jobtype == 4 }}
shell: bash
run: |
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Scalac.*" "zincBenchmarks/Jmh/clean" "runBenchmarks"
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Scalac.*" "runBenchmarks"
- name: Benchmark (Shapeless) against Target Branch (5)
if: ${{ github.event_name == 'pull_request' && matrix.jobtype == 5 }}
shell: bash
run: |
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Shapeless.*" "zincBenchmarks/Jmh/clean" "runBenchmarks"
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Shapeless.*" "runBenchmarks"
- name: Benchmark (AnalysisFormatBenchmark) against Target Branch (6)
if: ${{ matrix.jobtype == 6 }}
shell: bash
run: |
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "zincBenchmarks/Jmh/clean" "runBenchmarks"
sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "runBenchmarks"
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,12 @@ class AnalysisFormatBenchmark {
if (temp != null) IO.delete(temp)
}

@Benchmark
def readBinary(bh: Blackhole): Unit = bh.consume(readAll("", FileAnalysisStore.binary(_)))

@Benchmark
def readText(bh: Blackhole): Unit = bh.consume(readAll("-ref-text", FileAnalysisStore.text(_)))

@Benchmark
def readConsistentBinary(bh: Blackhole): Unit =
bh.consume(
readAll("-ref-cbin", ConsistentFileAnalysisStore.binary(_, ReadWriteMappers.getEmptyMappers))
)

@Benchmark
def writeBinary(bh: Blackhole): Unit =
bh.consume(writeAll("-test-bin", FileAnalysisStore.binary(_), cached))

@Benchmark
def writeText(bh: Blackhole): Unit =
bh.consume(writeAll("-test-text", FileAnalysisStore.text(_), cached))

@Benchmark
def writeConsistentBinary(bh: Blackhole): Unit =
bh.consume(
Expand Down

0 comments on commit 4ecd7ed

Please sign in to comment.