StoreBenchHarness
Interface: StoreBenchHarness
Defined in: packages/bench/src/suites/store.ts:46
What a store package provides to run benchStore
Same shape as LegacyTypesHarness of @webda/core/lib/test: the package creates its store, the suite does the rest.
Properties
backend
backend:
string
Defined in: packages/bench/src/suites/store.ts:50
Backend name displayed in the results: MemoryStore, PostgresStore...
capabilities?
optionalcapabilities?:StoreBenchCapabilities
Defined in: packages/bench/src/suites/store.ts:76
Optional features
emulated?
optionalemulated?:boolean
Defined in: packages/bench/src/suites/store.ts:80
The backend is an emulator: numbers are for regression tracking only
Methods
clean()?
optionalclean(store):Promise<void>
Defined in: packages/bench/src/suites/store.ts:66
Remove everything stored, called before and after the suite
Without it, the suite deletes the documents it created one by one.
Parameters
store
Store
the store
Returns
Promise<void>
createStore()
createStore(
name,models):Promise<Store<StoreParameters,StoreEvents>>
Defined in: packages/bench/src/suites/store.ts:58
Create, register in the Core, resolve and initialize an EMPTY store of the type under test
Parameters
name
string
service name
models
string[]
the models parameter
Returns
Promise<Store<StoreParameters, StoreEvents>>
the store
dropStore()?
optionaldropStore(store):Promise<void>
Defined in: packages/bench/src/suites/store.ts:72
Release the store resources at the end (drop table, stop...)
Parameters
store
Store
the store
Returns
Promise<void>