mirror of
https://github.com/octoleo/restic.git
synced 2024-11-16 18:15:20 +00:00
mem: Add benchmarks
This commit is contained in:
parent
e009c002ba
commit
13946e7db7
@ -14,8 +14,8 @@ type memConfig struct {
|
|||||||
be restic.Backend
|
be restic.Backend
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSuiteBackendMem(t *testing.T) {
|
func newTestSuite() *test.Suite {
|
||||||
suite := test.Suite{
|
return &test.Suite{
|
||||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||||
NewConfig: func() (interface{}, error) {
|
NewConfig: func() (interface{}, error) {
|
||||||
return &memConfig{}, nil
|
return &memConfig{}, nil
|
||||||
@ -54,6 +54,12 @@ func TestSuiteBackendMem(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
suite.RunTests(t)
|
|
||||||
|
func TestSuiteBackendMem(t *testing.T) {
|
||||||
|
newTestSuite().RunTests(t)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkSuiteBackendMem(t *testing.B) {
|
||||||
|
newTestSuite().RunBenchmarks(t)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user