mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
mem: Add benchmarks
This commit is contained in:
parent
e009c002ba
commit
13946e7db7
1 changed files with 10 additions and 4 deletions
|
@ -14,8 +14,8 @@ type memConfig struct {
|
|||
be restic.Backend
|
||||
}
|
||||
|
||||
func TestSuiteBackendMem(t *testing.T) {
|
||||
suite := test.Suite{
|
||||
func newTestSuite() *test.Suite {
|
||||
return &test.Suite{
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (interface{}, error) {
|
||||
return &memConfig{}, nil
|
||||
|
@ -54,6 +54,12 @@ func TestSuiteBackendMem(t *testing.T) {
|
|||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
suite.RunTests(t)
|
||||
}
|
||||
|
||||
func TestSuiteBackendMem(t *testing.T) {
|
||||
newTestSuite().RunTests(t)
|
||||
}
|
||||
|
||||
func BenchmarkSuiteBackendMem(t *testing.B) {
|
||||
newTestSuite().RunBenchmarks(t)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue