File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
LiteDB.Benchmarks/Benchmarks/Queries Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ public void GlobalSetupSimpleIndexBaseline()
2929 _fileMetaCollection . Insert ( FileMetaGenerator < FileMetaBase > . GenerateList ( N ) ) ; // executed once per each N value
3030 }
3131
32- [ GlobalSetup ( Target = nameof ( Query_CompoundIndexVariant1 ) ) ]
33- public void GlobalSetupCompoundIndexVariant1 ( )
32+ [ GlobalSetup ( Target = nameof ( Query_CompoundIndexVariant ) ) ]
33+ public void GlobalSetupCompoundIndexVariant ( )
3434 {
3535 DatabaseInstance = new LiteDatabase ( ConnectionString ) ;
3636 _fileMetaCollection = DatabaseInstance . GetCollection < FileMetaBase > ( ) ;
37- _fileMetaCollection . EnsureIndex ( _compoundIndexName , "$.IsFavorite +';' + $. ShouldBeShown" , true ) ;
37+ _fileMetaCollection . EnsureIndex ( _compoundIndexName , $ "$.{ nameof ( FileMetaBase . IsFavorite ) } ;$. { nameof ( FileMetaBase . ShouldBeShown ) } " ) ;
3838
3939 _fileMetaCollection . Insert ( FileMetaGenerator < FileMetaBase > . GenerateList ( N ) ) ; // executed once per each N value
4040 }
@@ -49,7 +49,7 @@ public List<FileMetaBase> Query_SimpleIndex_Baseline()
4949 }
5050
5151 [ Benchmark ]
52- public List < FileMetaBase > Query_CompoundIndexVariant1 ( )
52+ public List < FileMetaBase > Query_CompoundIndexVariant ( )
5353 {
5454 return _fileMetaCollection . Find ( Query . EQ ( _compoundIndexName , $ "{ false } ;{ true } ") ) . ToList ( ) ;
5555 }
You can’t perform that action at this time.
0 commit comments