mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01: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:
@@ -21,7 +21,7 @@ func TestName(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkName(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
for b.Loop() {
|
||||
Name()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user