Skip to content

Commit

Permalink
added ProcessByte benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
glaslos committed Dec 7, 2017
1 parent cf3f9ba commit b4238c4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ssdeep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestRollingHash(t *testing.T) {
}
s.rollHash(byte('A'))
rh := s.rollingState.rollSum()
if rh != 585 {
if rh != 585 {
t.Error("Rolling hash not matching")
}
}
Expand Down Expand Up @@ -142,3 +142,12 @@ func BenchmarkBlockSize(b *testing.B) {
s.GetBlockSize(207160)
}
}

func BenchmarkProcessByte(b *testing.B) {
s := NewSSDEEP()
s.blockSize = 42
s.newRollingState()
for i := 0; i < b.N; i++ {
s.processByte(byte(i))
}
}

0 comments on commit b4238c4

Please sign in to comment.