mirror of
https://github.com/photoprism/photoprism.git
synced 2025-11-02 13:04:17 +08:00
Benchmarks: Use b.Loop() to simplify the code and enhance performance #5226
Signed-off-by: letreturn <letreturn@outlook.com>
This commit is contained in:
@@ -80,7 +80,7 @@ func TestGenerateUID(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkGenerateUID(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
for b.Loop() {
|
||||
GenerateUID('x')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user