File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -227,10 +227,9 @@ export class BenchmarkRunner {
227227
228228 for ( let i = 0 ; i < this . config . iterations + this . config . warmup ; i ++ ) {
229229 try {
230- // Clear query cache before each iteration for accurate benchmarking
231- if ( adapter . clearCache ) {
232- adapter . clearCache ( ) ;
233- }
230+ // Note: We do NOT clear query cache here to measure real-world performance
231+ // Clearing cache would penalize databases with intelligent caching (like JSONIC)
232+ // and give unfair advantage to databases without caching
234233
235234 const start = performance . now ( ) ;
236235
@@ -642,8 +641,8 @@ export class BenchmarkRunner {
642641 const times = [ ] ;
643642
644643 for ( let i = 0 ; i < this . config . iterations + this . config . warmup ; i ++ ) {
645- // Clear query cache before each iteration for accurate benchmarking
646- if ( adapter . clearCache ) {
644+ // Clear cache only on warmup to measure real-world cached performance
645+ if ( i === 0 && adapter . clearCache ) {
647646 adapter . clearCache ( ) ;
648647 }
649648
You can’t perform that action at this time.
0 commit comments