Skip to content

Commit

Permalink
more benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
wcharczuk committed Apr 12, 2024
1 parent 00ecfe5 commit 0c8e996
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ func Benchmark_createGraph_preallocateNodes_4096(b *testing.B) {
benchmarkCreateGraph(4096, true, b)
}

func Benchmark_createGraph_customIdentifierProvider_4096(b *testing.B) {
b.Cleanup(func() {
SetIdentifierProvider(cryptoRandIdentifierProvider)
})
SetIdentifierProvider(counterIdentifierProvider)
benchmarkCreateGraph(4096, false, b)
}

func Benchmark_createGraphpreallocateNodes__customIdentifierProvider_4096(b *testing.B) {
b.Cleanup(func() {
SetIdentifierProvider(cryptoRandIdentifierProvider)
})
SetIdentifierProvider(counterIdentifierProvider)
benchmarkCreateGraph(4096, true, b)
}

func Benchmark_createGraph_8192(b *testing.B) {
benchmarkCreateGraph(8192, false, b)
}
Expand All @@ -95,6 +111,22 @@ func Benchmark_createGraph_preallocateNodes_8192(b *testing.B) {
benchmarkCreateGraph(8192, true, b)
}

func Benchmark_createGraph_customIdentifierProvider_8192(b *testing.B) {
b.Cleanup(func() {
SetIdentifierProvider(cryptoRandIdentifierProvider)
})
SetIdentifierProvider(counterIdentifierProvider)
benchmarkCreateGraph(8192, false, b)
}

func Benchmark_createGraphpreallocateNodes__customIdentifierProvider_8192(b *testing.B) {
b.Cleanup(func() {
SetIdentifierProvider(cryptoRandIdentifierProvider)
})
SetIdentifierProvider(counterIdentifierProvider)
benchmarkCreateGraph(8192, true, b)
}

func Benchmark_Stabilize_withPreInitialize_512(b *testing.B) {
benchmarkSize(512, b)
}
Expand Down

0 comments on commit 0c8e996

Please sign in to comment.