Commit 207b8ed5 authored by Thomas Hoffmann's avatar Thomas Hoffmann
Browse files

Add optimal combine benchmark

parent 8493342a
......@@ -297,6 +297,19 @@ func BenchmarkCombineThreshold(b *testing.B) {
}
func BenchmarkCombineOptimal(b *testing.B) {
log.SetOutput(ioutil.Discard)
config := benchConfig()
b.Run("5 of 9 servers", func(b *testing.B) { benchmarkCombine(config, 10, 9, 5, b) })
b.Run("6 of 11 servers", func(b *testing.B) { benchmarkCombine(config, 10, 11, 6, b) })
b.Run("7 of 13 servers", func(b *testing.B) { benchmarkCombine(config, 10, 13, 7, b) })
b.Run("8 of 15 servers", func(b *testing.B) { benchmarkCombine(config, 10, 15, 8, b) })
b.Run("9 of 17 servers", func(b *testing.B) { benchmarkCombine(config, 10, 17, 9, b) })
b.Run("10 of 19 servers", func(b *testing.B) { benchmarkCombine(config, 10, 19, 10, b) })
b.Run("11 of 21 servers", func(b *testing.B) { benchmarkCombine(config, 10, 21, 11, b) })
}
// Actual tests
func setupElection() *Election {
// netConfig, err := network.LoadConfig()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment