import { db } from "./db" ; import { query , lookup } from "@bluelibs/nova" ; import * as Benchmark from "benchmark" ; import { ITestSuite } from "../common" ; import { GROUPS } from "../constants" ; export function createSuites ( ) { return [ { name : "Test Fetching Bigger Model (Pure Mongo)" , async run ( ) { return await db . UserGameStats . findOne ( { } , { } ) ; } , } , { name : "Test Fetching Bigger Models (Pure Mongo)" , async run ( ) { return await db . UserGameStats . find ( { } ) . toArray ( ) ; } , } , { name : "Test Fetching Bigger Model (Nova)" , async run ( ) { return await query ( db . UserGameStats , { $all : true , } ) . fetchOne ( ) ; } , } , { name : "Test Fetching Bigger Models (Nova)" , async run ( ) { return await query ( db . UserGameStats , { $all : true , } ) . fetch ( ) ; } , } , ] ; }