<commit_before>// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package memdb

import (
	"testing"

	"github.com/ava-labs/avalanchego/database"
)

func TestInterface(t *testing.T) {
	for _, test := range database.Tests {
		test(t, New())
	}
}<commit_msg>database: Added benchmark interface for `memdb`.<commit_after>// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package memdb

import (
	"testing"

	"github.com/ava-labs/avalanchego/database"
)

func TestInterface(t *testing.T) {
	for _, test := range database.Tests {
		test(t, New())
	}
}

func BenchmarkInterface(b *testing.B) {
	for _, bench := range database.Benchmarks {
		db := New()

		for _, size := range []int{32, 64, 128, 256, 512, 1024, 2048, 4096} {
			bench(b, db, "memdb", 1000, size)
		}
	}
}
{'fraction_non_alphanumeric': 0.15046296296296297, 'fraction_numerical': 0.052083333333333336, 'mean_word_length': 3.7010869565217392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5416516', 'n_tokens_mistral': 367, 'n_tokens_neox': 308, 'n_words': 90}