mirror of https://bitbucket.org/ausocean/av.git
filter: benchmark: error checking for write function update descriptions
This commit is contained in:
parent
99b0ccc1b5
commit
b880657eae
|
@ -62,7 +62,10 @@ func BenchmarkBasic(b *testing.B) {
|
|||
b.Log("Frames: ", len(testPackets))
|
||||
for n := 0; n < b.N; n++ {
|
||||
for _, x := range testPackets {
|
||||
f.Write(x)
|
||||
_, err := f.Write(x)
|
||||
if err != nil {
|
||||
b.Fatalf("cannot write to basic filter: %v#", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +76,10 @@ func BenchmarkDifference(b *testing.B) {
|
|||
b.Log("Frames: ", len(testPackets))
|
||||
for n := 0; n < b.N; n++ {
|
||||
for _, x := range testPackets {
|
||||
f.Write(x)
|
||||
_, err := f.Write(x)
|
||||
if err != nil {
|
||||
b.Fatalf("cannot write to diff filter: %v#", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +90,10 @@ func BenchmarkKNN(b *testing.B) {
|
|||
b.Log("Frames: ", len(testPackets))
|
||||
for n := 0; n < b.N; n++ {
|
||||
for _, x := range testPackets {
|
||||
f.Write(x)
|
||||
_, err := f.Write(x)
|
||||
if err != nil {
|
||||
b.Fatalf("cannot write to KNN filter: %v#", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +104,10 @@ func BenchmarkMOG(b *testing.B) {
|
|||
b.Log("Frames: ", len(testPackets))
|
||||
for n := 0; n < b.N; n++ {
|
||||
for _, x := range testPackets {
|
||||
f.Write(x)
|
||||
_, err := f.Write(x)
|
||||
if err != nil {
|
||||
b.Fatalf("cannot write to MOG filter: %v#", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue