Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DisSys Inc.
bsc-shamir
Commits
207b8ed5
Commit
207b8ed5
authored
Jun 04, 2020
by
Thomas Hoffmann
Browse files
Add optimal combine benchmark
parent
8493342a
Changes
1
Hide whitespace changes
Inline
Side-by-side
election/election_test.go
View file @
207b8ed5
...
...
@@ -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()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment