Skip to content

Commit

Permalink
test: random string benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ichigozero committed Aug 12, 2023
1 parent d43909e commit 2de0ff0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions random/random_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ func Test(t *testing.T) {
r := New()
assert.Regexp(t, regexp.MustCompile("[0-9]+$"), r.String(8, Numeric))
}

func BenchmarkRandomString(b *testing.B) {
for n := 0; n < b.N; n++ {
String(32, Alphanumeric)
}
}

0 comments on commit 2de0ff0

Please # to comment.