Skip to content

Commit b6fbf10

Browse files
committed
Add benchmark
1 parent 3ca9d01 commit b6fbf10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mst_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func BenchmarkMST(b *testing.B) {
3636
n := 1000
3737
b.StopTimer()
3838
g := New(n)
39-
for i := 0; i < n; i++ {
40-
g.AddBoth(rand.Intn(n), rand.Intn(n))
39+
for i := 0; i < 2*n; i++ {
40+
g.AddCost(rand.Intn(n), rand.Intn(n), int64(rand.Int()))
4141
}
4242
b.StartTimer()
4343
for i := 0; i < b.N; i++ {

0 commit comments

Comments
 (0)