404 not found performance improvements
benchmark old ns/op new ns/op delta Benchmark404 737 249 -66.21% Benchmark404Many 2330 454 -80.52% benchmark old allocs new allocs delta Benchmark404 3 0 -100.00% Benchmark404Many 10 0 -100.00% benchmark old bytes new bytes delta Benchmark404 115 68 -40.87% Benchmark404Many 235 57 -75.74%
This commit is contained in:
+3
-3
@@ -67,8 +67,8 @@ var cleanTests = []struct {
|
||||
|
||||
func TestPathClean(t *testing.T) {
|
||||
for _, test := range cleanTests {
|
||||
assert.Equal(t, CleanPath(test.path), test.result)
|
||||
assert.Equal(t, CleanPath(test.result), test.result)
|
||||
assert.Equal(t, cleanPath(test.path), test.result)
|
||||
assert.Equal(t, cleanPath(test.result), test.result)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ func TestPathCleanMallocs(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range cleanTests {
|
||||
allocs := testing.AllocsPerRun(100, func() { CleanPath(test.result) })
|
||||
allocs := testing.AllocsPerRun(100, func() { cleanPath(test.result) })
|
||||
assert.Equal(t, allocs, 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user