Skip to content

Commit

Permalink
additional tests, so there's a frame of reference
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Aug 25, 2022
1 parent e5bc533 commit 8c36f1f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import org.openjdk.jmh.infra.Blackhole
@BenchmarkMode(Mode.Throughput)
open class JmhTest {

@Benchmark
fun noMockOrStub(blackhole: Blackhole) {
val mockedClass = MockedClass()
blackhole.consume(mockedClass)
}

@Benchmark
fun simpleMock(blackhole: Blackhole) {
val mockedClass: MockedClass = mockk()
blackhole.consume(mockedClass)
}

@Benchmark
fun simpleMockAndStub(blackhole: Blackhole) {
val mockedClass: MockedClass = mockk()
Expand Down

0 comments on commit 8c36f1f

Please sign in to comment.