forked from TrueCloudLab/frostfs-node
[#1262] metabase: Add benchmarks for Put
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
f1223b46df
commit
456e1584d6
4 changed files with 99 additions and 6 deletions
|
@ -46,10 +46,11 @@ func testOID() *oidSDK.ID {
|
|||
return id
|
||||
}
|
||||
|
||||
func newDB(t testing.TB) *meta.DB {
|
||||
func newDB(t testing.TB, opts ...meta.Option) *meta.DB {
|
||||
path := t.Name()
|
||||
|
||||
bdb := meta.New(meta.WithPath(path), meta.WithPermissions(0600))
|
||||
bdb := meta.New(append([]meta.Option{meta.WithPath(path), meta.WithPermissions(0600)},
|
||||
opts...)...)
|
||||
|
||||
require.NoError(t, bdb.Open())
|
||||
|
||||
|
@ -61,11 +62,11 @@ func newDB(t testing.TB) *meta.DB {
|
|||
return bdb
|
||||
}
|
||||
|
||||
func generateObject(t *testing.T) *object.Object {
|
||||
func generateObject(t testing.TB) *object.Object {
|
||||
return generateObjectWithCID(t, cidtest.ID())
|
||||
}
|
||||
|
||||
func generateObjectWithCID(t *testing.T, cid *cid.ID) *object.Object {
|
||||
func generateObjectWithCID(t testing.TB, cid *cid.ID) *object.Object {
|
||||
version := version.New()
|
||||
version.SetMajor(2)
|
||||
version.SetMinor(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue