You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2020/07/20 12:01:11 UTC

[lucenenet] branch benchmarkdotnet updated (573f301 -> 19ce5e9)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a change to branch benchmarkdotnet
in repository https://gitbox.apache.org/repos/asf/lucenenet.git.


 discard 573f301  Adds simple benchmark between nuget versions
     add f297f00  Removed miscellaneous .NET Core 1.x/.NET Standard 1.x support from projects that were previously missed
     add d79d273  Removed unused dependencies for .NET Framework
     add bbb2b32  Fixed up Microsoft.Extension.Configuration references
     add 2bd7ab6  Lucene.Net.Codecs.SimpleText: Using decimal is 30% faster than using BigInteger for add and subtract
     add 18dfe36  Lucene.Net.TestFramework.Util.LuceneTestCase: Completed implementation of Nightly, Weekly, AwaitsFix, and Slow attributes.
     add f8256b5  Applied the Slow and Nightly attributes to all tests that they apply to
     add e017bda  azure-pipelines.yml: Removed NuGet caching, as it doesn't account for when dependencies change
     add b78efb0  azure-pipelines.yml: Cleaned up unused variable PublishedArtifactZipFileName
     add cee19c3  Added NuGet.config to work around build pipeline caching issues
     add 3cda476  LICENSE.txt, NOTICE.txt: Updated copyright info
     add fc22230  azure-pipelines.yml: Added build features for the test framework's system properties
     add 03aa984  Lucene.Net.TestFramework: Added logging of system properties so we can see how they are configured in CI
     add 61c31185 publish-test-results.yml: View files in test environment after artifacts are downloaded
     add e17221f  BREAKING: Lucene.Net.TestFramework: Refactored LuceneTestCase to correctly load static system properties after the LuceneTestFrameworkIntializer sets the configuration factory. Renamed most public static fields and made them into static properties.
     add c2d5521  SWEEP: Removed fully-qualified namespace from System exception types and added using directives instead
     add 6719070  Lucene.Net.Util.ArrayUtil: Reduced memory allocations when using GetNaturalComparer<T>() by creating a singleton instance.
     add ce6aef0  Removed some unused using directives
     add 4455830  Lucene.Net.Index.IndexWriterConfig: Minor documentation fix
     add c09fea6  build/Dependencies.props: Upgraded ICU4N to 60.1.0-alpha.351
     add 0446a4e  Added missing license headers
     add 88e6b5f  azure-pipelines.yml: Fixed broken checkout and relative paths in the Publish stage (required for Publish symbols path task)
     add d5898c0  azure-pipelines.yml: Fixed Release job to checkout the source so it can be included in the release distribution
     add 2755024  azure-pipelines.yml: Fixed paths to exclude downloaded artifacts from the release distribution
     new b80ccdd  Adds simple benchmark between nuget versions
     new e11b441  Lucene.Net.Tests.BenchmarkDotNet: Updated HomePageScripBenchmarks to include beta 5, beta 6, and beta 10
     new 19ce5e9  Lucene.Net.Tests.BenchmarkDotNet: Added benchmarks for IndexFiles and SearchFiles

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (573f301)
            \
             N -- N -- N   refs/heads/benchmarkdotnet (19ce5e9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 LICENSE.txt                                        |   2 +-
 Lucene.Net.sln                                     |   1 +
 NOTICE.txt                                         |   2 +-
 .../site/lucenetemplate/web.config => NuGet.config |  13 +-
 azure-pipelines.yml                                | 153 +++++---
 build/Dependencies.props                           |  16 +-
 build/azure-templates/publish-nuget-packages.yml   |   6 +-
 build/azure-templates/publish-test-binaries.yml    |  42 +++
 build/azure-templates/publish-test-results.yml     |   4 +-
 build/azure-templates/run-tests-on-os.yml          |   4 +-
 .../Analysis/CommonGrams/CommonGramsFilter.cs      |   3 +-
 .../Analysis/CommonGrams/CommonGramsQueryFilter.cs |   2 +-
 .../Analysis/Hunspell/Dictionary.cs                |   4 +-
 .../Miscellaneous/HyphenatedWordsFilter.cs         |   3 +-
 .../Miscellaneous/Lucene47WordDelimiterFilter.cs   |   2 +-
 .../Analysis/Miscellaneous/PatternAnalyzer.cs      |   4 +-
 .../Analysis/Sinks/TeeSinkTokenFilter.cs           |   2 +-
 .../Analysis/Standard/ClassicTokenizerImpl.cs      |   2 +-
 .../Analysis/Standard/StandardTokenizerImpl.cs     |   2 +-
 .../Lucene.Net.Analysis.Common.csproj              |   2 -
 .../Lucene.Net.Analysis.Kuromoji.csproj            |   5 -
 .../Lucene.Net.Analysis.Morfologik.csproj          |   5 -
 .../Lucene.Net.Analysis.OpenNLP.csproj             |   7 +-
 .../Lucene.Net.Analysis.Phonetic.csproj            |   5 -
 .../Support/Language/Replacement.cs                |  19 +-
 .../Lucene.Net.Analysis.SmartCn.csproj             |   5 -
 .../Lucene.Net.Analysis.Stempel.csproj             |   5 -
 .../ByTask/Feeds/QueryMaker.cs                     |   3 +-
 .../ByTask/Feeds/SimpleQueryMaker.cs               |   3 +-
 .../Lucene.Net.Benchmark.csproj                    |  11 -
 .../Support/Sax/Ext/Attributes2.cs                 |   4 +-
 .../Lucene.Net.Classification.csproj               |   5 -
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj     |   6 -
 .../Memory/DirectDocValuesProducer.cs              |   2 +-
 .../Memory/DirectPostingsFormat.cs                 |   2 +-
 .../SimpleText/SimpleTextDocValuesReader.cs        |  17 +-
 .../SimpleText/SimpleTextDocValuesWriter.cs        |  15 +-
 src/Lucene.Net.Demo/Lucene.Net.Demo.csproj         |   5 -
 .../Lucene.Net.Expressions.csproj                  |   5 -
 src/Lucene.Net.Facet/Lucene.Net.Facet.csproj       |   5 -
 src/Lucene.Net.Facet/Range/Range.cs                |   2 +-
 .../Taxonomy/Directory/DirectoryTaxonomyWriter.cs  |   2 +-
 src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj |   5 -
 .../Highlight/GradientFormatter.cs                 |   2 +-
 .../Lucene.Net.Highlighter.csproj                  |   5 -
 src/Lucene.Net.Join/Lucene.Net.Join.csproj         |   5 -
 src/Lucene.Net.Join/ToChildBlockJoinQuery.cs       |   1 -
 src/Lucene.Net.Join/ToParentBlockJoinQuery.cs      |   1 -
 src/Lucene.Net.Memory/Lucene.Net.Memory.csproj     |   5 -
 src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs  |   6 +-
 src/Lucene.Net.Misc/Lucene.Net.Misc.csproj         |   5 -
 src/Lucene.Net.Queries/Lucene.Net.Queries.csproj   |   5 -
 .../Lucene.Net.QueryParser.csproj                  |   2 -
 .../Lucene.Net.Replicator.csproj                   |   2 -
 .../Http/Abstractions/IReplicationService.cs       |   6 +-
 src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj   |   5 -
 src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj   |   5 -
 src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj   |   5 -
 .../Analysis/BaseTokenStreamTestCase.cs            |  12 +-
 .../Analysis/MockAnalyzer.cs                       |   2 +-
 .../Codecs/Lucene3x/PreFlexRWPostingsFormat.cs     |   2 +-
 .../Codecs/Lucene3x/PreFlexRWTermVectorsFormat.cs  |   2 +-
 .../Codecs/MockRandom/MockRandomPostingsFormat.cs  |  40 +-
 .../Index/BasePostingsFormatTestCase.cs            |  76 ++--
 .../Index/BaseStoredFieldsFormatTestCase.cs        |  13 +-
 .../Index/RandomIndexWriter.cs                     |  12 +-
 .../Index/ThreadedIndexingAndSearchingTestCase.cs  |  54 +--
 .../Lucene.Net.TestFramework.csproj                |  15 +-
 .../Search/ShardSearchingTestBase.cs               |   4 +-
 .../Store/MockDirectoryWrapper.cs                  |  22 +-
 .../Support/Attributes/LongRunningTestAttribute.cs |  40 --
 .../Configuration/ConfigurationSettingTestCase.cs  |  48 ++-
 src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs |  68 ++--
 src/Lucene.Net.TestFramework/Util/LineFileDocs.cs  |  10 +-
 .../Util/LuceneTestCase.cs                         | 405 +++++++++++++++------
 .../Util/TestRuleSetupAndRestoreClassEnv.cs        |  70 ++--
 src/Lucene.Net.TestFramework/Util/TestUtil.cs      |   8 +-
 .../Analysis/Ar/TestArabicAnalyzer.cs              |   2 +-
 .../Analysis/Bg/TestBulgarianAnalyzer.cs           |   2 +-
 .../Analysis/Br/TestBrazilianStemmer.cs            |   2 +-
 .../Analysis/Ca/TestCatalanAnalyzer.cs             |   2 +-
 .../CharFilters/HTMLStripCharFilterTest.cs         |   4 +-
 .../Analysis/CharFilters/TestMappingCharFilter.cs  |  16 +-
 .../CharFilters/TestMappingCharFilterFactory.cs    |   2 +-
 .../Analysis/Cjk/TestCJKAnalyzer.cs                |   4 +-
 .../Analysis/Cjk/TestCJKBigramFilter.cs            |   4 +-
 .../Analysis/Cjk/TestCJKTokenizer.cs               |   2 +-
 .../Analysis/Cjk/TestCJKWidthFilter.cs             |   2 +-
 .../Analysis/Ckb/TestSoraniAnalyzer.cs             |   2 +-
 .../Analysis/Cn/TestChineseTokenizer.cs            |   2 +-
 .../Analysis/Commongrams/CommonGramsFilterTest.cs  |   4 +-
 .../Compound/TestCompoundWordTokenFilter.cs        |   4 +-
 .../Analysis/Core/TestAnalyzers.cs                 |  16 +-
 .../Analysis/Core/TestBugInSomething.cs            |   4 +-
 .../Analysis/Core/TestClassicAnalyzer.cs           |   6 +-
 .../Analysis/Core/TestFactories.cs                 |   4 +-
 .../Analysis/Core/TestKeywordAnalyzer.cs           |   2 +-
 .../Analysis/Core/TestRandomChains.cs              |  23 +-
 .../Analysis/Core/TestStandardAnalyzer.cs          |   6 +-
 .../Analysis/Core/TestStopFilter.cs                |   2 +-
 .../Analysis/Core/TestTypeTokenFilter.cs           |   2 +-
 .../Analysis/Core/TestUAX29URLEmailAnalyzer.cs     |   2 +-
 .../Analysis/Core/TestUAX29URLEmailTokenizer.cs    |   4 +-
 .../Analysis/Cz/TestCzechAnalyzer.cs               |   2 +-
 .../Analysis/Da/TestDanishAnalyzer.cs              |   2 +-
 .../Analysis/De/TestGermanAnalyzer.cs              |   2 +-
 .../Analysis/De/TestGermanLightStemFilter.cs       |   2 +-
 .../Analysis/De/TestGermanMinimalStemFilter.cs     |   2 +-
 .../Analysis/De/TestGermanNormalizationFilter.cs   |   2 +-
 .../Analysis/De/TestGermanStemFilter.cs            |   2 +-
 .../Analysis/El/GreekAnalyzerTest.cs               |   2 +-
 .../Analysis/En/TestEnglishAnalyzer.cs             |   2 +-
 .../Analysis/En/TestEnglishMinimalStemFilter.cs    |   2 +-
 .../Analysis/En/TestKStemmer.cs                    |   2 +-
 .../Analysis/En/TestPorterStemFilter.cs            |   2 +-
 .../Analysis/Es/TestSpanishAnalyzer.cs             |   2 +-
 .../Analysis/Es/TestSpanishLightStemFilter.cs      |   2 +-
 .../Analysis/Eu/TestBasqueAnalyzer.cs              |   2 +-
 .../Analysis/Fa/TestPersianAnalyzer.cs             |   2 +-
 .../Analysis/Fa/TestPersianCharFilter.cs           |   2 +-
 .../Analysis/Fi/TestFinnishAnalyzer.cs             |   2 +-
 .../Analysis/Fi/TestFinnishLightStemFilter.cs      |   2 +-
 .../Analysis/Fr/TestFrenchAnalyzer.cs              |   2 +-
 .../Analysis/Fr/TestFrenchLightStemFilter.cs       |   2 +-
 .../Analysis/Fr/TestFrenchMinimalStemFilter.cs     |   2 +-
 .../Analysis/Ga/TestIrishAnalyzer.cs               |   2 +-
 .../Analysis/Gl/TestGalicianAnalyzer.cs            |   2 +-
 .../Analysis/Gl/TestGalicianMinimalStemFilter.cs   |   2 +-
 .../Analysis/Hi/TestHindiAnalyzer.cs               |   2 +-
 .../Analysis/Hu/TestHungarianAnalyzer.cs           |   2 +-
 .../Analysis/Hunspell/TestHunspellStemFilter.cs    |   2 +-
 .../Analysis/Hy/TestArmenianAnalyzer.cs            |   2 +-
 .../Analysis/Id/TestIndonesianAnalyzer.cs          |   2 +-
 .../Analysis/It/TestItalianAnalyzer.cs             |   2 +-
 .../Analysis/It/TestItalianLightStemFilter.cs      |   2 +-
 .../Analysis/Lv/TestLatvianAnalyzer.cs             |   2 +-
 .../Analysis/Miscellaneous/PatternAnalyzerTest.cs  |   2 +-
 .../Miscellaneous/TestASCIIFoldingFilter.cs        |   2 +-
 .../Miscellaneous/TestCapitalizationFilter.cs      |   2 +-
 .../Miscellaneous/TestHyphenatedWordsFilter.cs     |   2 +-
 .../Analysis/Miscellaneous/TestKeepWordFilter.cs   |   2 +-
 .../TestRemoveDuplicatesTokenFilter.cs             |   4 +-
 .../Miscellaneous/TestScandinavianFoldingFilter.cs |   2 +-
 .../TestScandinavianNormalizationFilter.cs         |   2 +-
 .../Analysis/Miscellaneous/TestTrimFilter.cs       |   4 +-
 .../Miscellaneous/TestWordDelimiterFilter.cs       |   8 +-
 .../Analysis/NGram/EdgeNGramTokenFilterTest.cs     |   7 +-
 .../Analysis/NGram/EdgeNGramTokenizerTest.cs       |  14 +-
 .../Analysis/NGram/NGramTokenFilterTest.cs         |   5 +-
 .../Analysis/NGram/NGramTokenizerTest.cs           |  11 +-
 .../Analysis/Nl/TestDutchStemmer.cs                |   2 +-
 .../Analysis/No/TestNorwegianAnalyzer.cs           |   2 +-
 .../Analysis/No/TestNorwegianLightStemFilter.cs    |   2 +-
 .../Analysis/No/TestNorwegianMinimalStemFilter.cs  |   2 +-
 .../Analysis/Path/TestPathHierarchyTokenizer.cs    |   4 +-
 .../Path/TestReversePathHierarchyTokenizer.cs      |   4 +-
 .../Pattern/TestPatternCaptureGroupTokenFilter.cs  |   2 +-
 .../Pattern/TestPatternReplaceCharFilter.cs        |   8 +-
 .../Analysis/Pattern/TestPatternReplaceFilter.cs   |   4 +-
 .../Analysis/Pattern/TestPatternTokenizer.cs       |   4 +-
 .../Analysis/Pt/TestPortugueseAnalyzer.cs          |   2 +-
 .../Analysis/Pt/TestPortugueseLightStemFilter.cs   |   2 +-
 .../Analysis/Pt/TestPortugueseMinimalStemFilter.cs |   2 +-
 .../Analysis/Pt/TestPortugueseStemFilter.cs        |   2 +-
 .../Analysis/Reverse/TestReverseStringFilter.cs    |   2 +-
 .../Analysis/Ro/TestRomanianAnalyzer.cs            |   2 +-
 .../Analysis/Ru/TestRussianAnalyzer.cs             |   2 +-
 .../Analysis/Ru/TestRussianLightStemFilter.cs      |   2 +-
 .../Analysis/Shingle/ShingleFilterTest.cs          |   7 +-
 .../Analysis/Snowball/TestSnowball.cs              |   5 +-
 .../Analysis/Snowball/TestSnowballVocab.cs         |   6 +-
 .../Analysis/Sv/TestSwedishAnalyzer.cs             |   2 +-
 .../Analysis/Sv/TestSwedishLightStemFilter.cs      |   2 +-
 .../Analysis/Synonym/TestSynonymMapFilter.cs       |  20 +-
 .../Analysis/Th/TestThaiAnalyzer.cs                |   4 +-
 .../Analysis/Tr/TestTurkishAnalyzer.cs             |   2 +-
 .../Analysis/Util/TestCharArrayMap.cs              |   2 +-
 .../Analysis/Util/TestCharTokenizers.cs            |   6 +-
 .../Analysis/Util/TestRollingCharBuffer.cs         |  20 +-
 .../Analysis/Util/TestSegmentingTokenizerBase.cs   |   4 +-
 .../Analysis/Wikipedia/WikipediaTokenizerTest.cs   |   4 +-
 .../Analysis/Icu/Segmentation/TestICUTokenizer.cs  |   6 +-
 .../Icu/Segmentation/TestICUTokenizerCJK.cs        |   4 +-
 .../Analysis/Icu/TestICUFoldingFilter.cs           |   2 +-
 .../Analysis/Icu/TestICUNormalizer2CharFilter.cs   |  29 +-
 .../Analysis/Icu/TestICUNormalizer2Filter.cs       |   2 +-
 .../Analysis/Icu/TestICUTransformFilter.cs         |   2 +-
 .../Collation/TestICUCollationKeyAnalyzer.cs       |   2 +-
 .../Dict/TestTokenInfoDictionary.cs                |   2 +-
 .../TestExtendedMode.cs                            |   5 +-
 .../TestJapaneseAnalyzer.cs                        |   3 +-
 .../TestJapaneseIterationMarkCharFilter.cs         |   4 +-
 .../TestJapaneseKatakanaStemFilter.cs              |   2 +-
 .../TestJapaneseReadingFormFilter.cs               |   4 +-
 .../TestJapaneseTokenizer.cs                       |  27 +-
 .../TestSearchMode.cs                              |   2 +-
 .../Morfologik/TestMorfologikAnalyzer.cs           |   2 +-
 .../Uk/TestUkrainianAnalyzer.cs                    |   2 +-
 .../DoubleMetaphoneFilterTest.cs                   |   4 +-
 .../Language/Bm/CacheSubSequencePerformanceTest.cs |   8 +-
 .../Language/Bm/PhoneticEnginePerformanceTest.cs   |   9 +-
 .../TestBeiderMorseFilter.cs                       |   2 +-
 .../TestPhoneticFilter.cs                          |   8 +-
 .../TestSmartChineseAnalyzer.cs                    |   8 +-
 .../Pl/TestPolishAnalyzer.cs                       |   2 +-
 .../BenchmarkTestCase.cs                           |   2 +-
 .../ByTask/TestPerfTasksLogic.cs                   |   3 +-
 .../Quality/TestQualityRun.cs                      |   4 +-
 .../HomePageScriptBenchmarks.cs                    |   3 +
 .../IndexFilesBenchmarks.cs                        | 231 ++++++++++++
 .../Lucene.Net.Tests.BenchmarkDotNet.csproj        |   7 +
 .../SearchFilesBenchmarks.cs                       | 128 +++++++
 .../Util/ContentGenerator.cs                       | 110 ++++++
 .../Util/PathUtil.cs                               |  64 ++++
 .../Pulsing/Test10KPulsings.cs                     |   4 +-
 .../SimpleText/TestSimpleTextPostingsFormat.cs     |   1 +
 .../TestDemoExpressions.cs                         |   2 +-
 src/Lucene.Net.Tests.Facet/FacetTestCase.cs        |   2 +-
 .../Range/TestRangeFacetCounts.cs                  |  26 +-
 .../SortedSet/TestSortedSetDocValuesFacets.cs      |   2 +-
 .../Taxonomy/Directory/TestAddTaxonomy.cs          |   1 +
 .../Directory/TestConcurrentFacetedIndexing.cs     |   2 +-
 .../Directory/TestDirectoryTaxonomyWriter.cs       |   5 +-
 .../Taxonomy/TestSearcherTaxonomyManager.cs        |  23 +-
 .../Taxonomy/TestTaxonomyCombined.cs               |  12 +-
 .../Taxonomy/TestTaxonomyFacetCounts.cs            |   2 +-
 .../Taxonomy/TestTaxonomyFacetSumValueSource.cs    |   4 +-
 .../Taxonomy/WriterCache/TestCharBlockArray.cs     |   6 +-
 .../WriterCache/TestCompactLabelToOrdinal.cs       |   8 +-
 src/Lucene.Net.Tests.Facet/TestDrillSideways.cs    |  46 +--
 .../AllGroupHeadsCollectorTest.cs                  |  18 +-
 .../AllGroupsCollectorTest.cs                      |   2 +-
 .../DistinctValuesCollectorTest.cs                 |   6 +-
 .../GroupFacetCollectorTest.cs                     |  16 +-
 src/Lucene.Net.Tests.Grouping/TestGrouping.cs      |  52 +--
 .../Highlight/Custom/HighlightCustomQueryTest.cs   |   4 +-
 .../Highlight/HighlighterTest.cs                   |  62 ++--
 .../TestPostingsHighlighterRanking.cs              |   1 +
 .../VectorHighlight/SimpleFragListBuilderTest.cs   |   2 +-
 .../VectorHighlight/SimpleFragmentsBuilderTest.cs  |   4 +-
 src/Lucene.Net.Tests.Join/TestBlockJoin.cs         |  30 +-
 src/Lucene.Net.Tests.Join/TestJoinUtil.cs          |  26 +-
 .../Index/Memory/MemoryIndexTest.cs                |  11 +-
 .../Index/Sorter/IndexSortingTest.cs               |   2 +-
 .../Index/Sorter/SorterTestBase.cs                 |   4 +-
 .../Index/Sorter/SortingAtomicReaderTest.cs        |   4 +-
 src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs |   6 +-
 .../Function/FunctionTestSetup.cs                  |   8 +-
 .../Spans/TestSpanQueryParserSimpleSample.cs       |   4 +-
 .../Flexible/Standard/TestNumericQueryParser.cs    |   8 +-
 .../Flexible/Standard/TestQPHelper.cs              |   2 +-
 .../Util/QueryParserTestBase.cs                    |   2 +-
 src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs |   6 +-
 .../IndexAndTaxonomyReplicationClientTest.cs       |   5 +-
 .../IndexAndTaxonomyRevisionTest.cs                |   2 +-
 .../IndexReplicationClientTest.cs                  |   6 +-
 .../Queries/TestSlowFuzzyQuery2.cs                 |   4 +-
 .../Spell/TestWordBreakSpellChecker.cs             |   4 +-
 .../Analyzing/AnalyzingInfixSuggesterTest.cs       |  20 +-
 .../Suggest/Analyzing/AnalyzingSuggesterTest.cs    |  12 +-
 .../Suggest/Analyzing/FuzzySuggesterTest.cs        |  26 +-
 .../Suggest/Analyzing/TestFreeTextSuggester.cs     |  42 +--
 .../Analysis/TestLookaheadTokenFilter.cs           |   8 +-
 .../Analysis/TestMockAnalyzer.cs                   |   2 +-
 .../Configuration/TestConfigurationSettings.cs     |  24 +-
 .../Configuration/TestSystemProperties.cs          |  22 +-
 .../Lucene.Net.Tests.TestFramework.csproj          |   8 +-
 .../Lucene.Net.Tests._E-I.csproj                   |   1 +
 .../Analysis/TestGraphTokenizers.cs                |  41 +--
 .../Analysis/TestLookaheadTokenFilter.cs           |  11 +-
 src/Lucene.Net.Tests/Analysis/TestMockAnalyzer.cs  |   4 +-
 .../Codecs/Lucene3x/TestSurrogates.cs              |  32 +-
 .../Codecs/Lucene41/TestBlockPostingsFormat3.cs    |   4 +-
 .../Codecs/PerField/TestPerFieldPostingsFormat2.cs |  12 +-
 src/Lucene.Net.Tests/Index/Test2BPositions.cs      |   2 +-
 src/Lucene.Net.Tests/Index/Test2BPostings.cs       |   4 +-
 src/Lucene.Net.Tests/Index/Test4GBStoredFields.cs  |   8 +-
 src/Lucene.Net.Tests/Index/TestAddIndexes.cs       |  37 +-
 src/Lucene.Net.Tests/Index/TestAtomicUpdate.cs     |   1 +
 .../Index/TestBackwardsCompatibility.cs            |  24 +-
 .../Index/TestBackwardsCompatibility3x.cs          |  22 +-
 src/Lucene.Net.Tests/Index/TestBagOfPositions.cs   |   7 +-
 src/Lucene.Net.Tests/Index/TestBagOfPostings.cs    |   6 +-
 .../Index/TestBinaryDocValuesUpdates.cs            |   3 +-
 src/Lucene.Net.Tests/Index/TestCheckIndex.cs       |   2 +-
 src/Lucene.Net.Tests/Index/TestCodecs.cs           |  10 +-
 .../Index/TestConcurrentMergeScheduler.cs          |  12 +-
 .../Index/TestCrashCausesCorruptIndex.cs           |   2 +-
 src/Lucene.Net.Tests/Index/TestDeletionPolicy.cs   |   8 +-
 .../Index/TestDirectoryReaderReopen.cs             |   2 +-
 src/Lucene.Net.Tests/Index/TestDoc.cs              |   6 +-
 src/Lucene.Net.Tests/Index/TestDocTermOrds.cs      |  34 +-
 .../Index/TestDocValuesWithThreads.cs              |   6 +-
 .../Index/TestDocumentsWriterDeleteQueue.cs        |   9 +-
 .../Index/TestDocumentsWriterStallControl.cs       |   2 +-
 .../Index/TestFlushByRamOrCountsPolicy.cs          |   7 +-
 .../Index/TestForceMergeForever.cs                 |   2 +-
 src/Lucene.Net.Tests/Index/TestIndexInput.cs       |   2 +-
 src/Lucene.Net.Tests/Index/TestIndexWriter.cs      |  19 +-
 .../Index/TestIndexWriterCommit.cs                 |   4 +-
 .../Index/TestIndexWriterConfig.cs                 |   2 +-
 .../Index/TestIndexWriterDelete.cs                 |  50 +--
 .../Index/TestIndexWriterExceptions.cs             |  60 ++-
 .../Index/TestIndexWriterForceMerge.cs             |   8 +-
 .../Index/TestIndexWriterMerging.cs                |  13 +-
 .../Index/TestIndexWriterNRTIsCurrent.cs           |   6 +-
 .../Index/TestIndexWriterOnDiskFull.cs             |  46 +--
 .../Index/TestIndexWriterOutOfFileDescriptors.cs   |  14 +-
 .../Index/TestIndexWriterReader.cs                 |  18 +-
 .../Index/TestIndexWriterUnicode.cs                |   5 +-
 .../Index/TestIndexWriterWithThreads.cs            |  27 +-
 src/Lucene.Net.Tests/Index/TestIndexableField.cs   |   6 +-
 src/Lucene.Net.Tests/Index/TestIntBlockPool.cs     |   3 +-
 src/Lucene.Net.Tests/Index/TestLongPostings.cs     |  28 +-
 src/Lucene.Net.Tests/Index/TestMixedCodecs.cs      |   4 +-
 .../Index/TestMixedDocValuesUpdates.cs             |   4 +-
 src/Lucene.Net.Tests/Index/TestMultiFields.cs      |  14 +-
 .../Index/TestNRTReaderWithThreads.cs              |   6 +-
 src/Lucene.Net.Tests/Index/TestNRTThreads.cs       |   9 +-
 src/Lucene.Net.Tests/Index/TestNeverDelete.cs      |   2 +-
 src/Lucene.Net.Tests/Index/TestNorms.cs            |   1 +
 .../Index/TestNumericDocValuesUpdates.cs           |   4 +-
 .../Index/TestParallelReaderEmptyIndex.cs          |   4 +-
 src/Lucene.Net.Tests/Index/TestReaderClosed.cs     |   4 +-
 src/Lucene.Net.Tests/Index/TestRollingUpdates.cs   |  12 +-
 src/Lucene.Net.Tests/Index/TestSegmentMerger.cs    |   2 +-
 src/Lucene.Net.Tests/Index/TestSegmentReader.cs    |   8 +-
 src/Lucene.Net.Tests/Index/TestStressAdvance.cs    |  20 +-
 src/Lucene.Net.Tests/Index/TestStressIndexing.cs   |   1 +
 src/Lucene.Net.Tests/Index/TestStressIndexing2.cs  |  16 +-
 src/Lucene.Net.Tests/Index/TestStressNRT.cs        |  37 +-
 src/Lucene.Net.Tests/Index/TestSumDocFreq.cs       |   2 +-
 src/Lucene.Net.Tests/Index/TestTermdocPerf.cs      |   9 +-
 src/Lucene.Net.Tests/Index/TestTermsEnum.cs        |  54 +--
 src/Lucene.Net.Tests/Index/TestTermsEnum2.cs       |   2 +-
 .../Index/TestTieredMergePolicy.cs                 |  10 +-
 .../Search/Payloads/TestPayloadNearQuery.cs        |   2 +-
 .../Search/Spans/TestPayloadSpans.cs               |   8 +-
 src/Lucene.Net.Tests/Search/TestAutomatonQuery.cs  |   2 +-
 src/Lucene.Net.Tests/Search/TestBoolean2.cs        |   4 +-
 src/Lucene.Net.Tests/Search/TestBooleanQuery.cs    |  12 +-
 .../Search/TestControlledRealTimeReopenThread.cs   |  31 +-
 .../Search/TestCustomSearcherSort.cs               |   2 +-
 src/Lucene.Net.Tests/Search/TestDocBoost.cs        |   2 +-
 .../Search/TestDocTermOrdsRangeFilter.cs           |   2 +-
 .../Search/TestDocTermOrdsRewriteMethod.cs         |   4 +-
 src/Lucene.Net.Tests/Search/TestFieldCache.cs      |   4 +-
 src/Lucene.Net.Tests/Search/TestLiveFieldValues.cs |   4 +-
 .../Search/TestMultiPhraseQuery.cs                 |   4 +-
 .../Search/TestMultiTermConstantScore.cs           |   6 +-
 .../Search/TestMultiTermQueryRewrites.cs           |   4 +-
 .../Search/TestNumericRangeQuery32.cs              |   2 +-
 .../Search/TestNumericRangeQuery64.cs              |   2 +-
 .../Search/TestPositionIncrement.cs                |   6 +-
 src/Lucene.Net.Tests/Search/TestPrefixRandom.cs    |   2 +-
 src/Lucene.Net.Tests/Search/TestRegexpRandom2.cs   |   6 +-
 src/Lucene.Net.Tests/Search/TestScorerPerf.cs      |   6 +-
 src/Lucene.Net.Tests/Search/TestSearchAfter.cs     |   4 +-
 .../Search/TestSearchWithThreads.cs                |   4 +-
 src/Lucene.Net.Tests/Search/TestSearcherManager.cs |  19 +-
 src/Lucene.Net.Tests/Search/TestShardSearching.cs  |  22 +-
 src/Lucene.Net.Tests/Search/TestSortRandom.cs      |  14 +-
 src/Lucene.Net.Tests/Search/TestTopDocsMerge.cs    |   2 +-
 src/Lucene.Net.Tests/Search/TestWildcard.cs        |   8 +-
 src/Lucene.Net.Tests/Search/TestWildcardRandom.cs  |   4 +-
 src/Lucene.Net.Tests/Store/TestCopyBytes.cs        |   5 +-
 src/Lucene.Net.Tests/Store/TestDirectory.cs        |   9 +-
 src/Lucene.Net.Tests/Store/TestHugeRamFile.cs      |   4 +-
 src/Lucene.Net.Tests/Store/TestLockFactory.cs      |   9 +-
 src/Lucene.Net.Tests/Store/TestMultiMMap.cs        |   2 +
 .../Store/TestNRTCachingDirectory.cs               |   2 +-
 .../Support/Index/TestTaskMergeScheduler.cs        |   2 +-
 src/Lucene.Net.Tests/Support/TestWeakDictionary.cs |   9 +-
 .../Support/TestWeakDictionaryBehavior.cs          |   6 +-
 src/Lucene.Net.Tests/TestExternalCodecs.cs         |  12 +-
 src/Lucene.Net.Tests/TestMergeSchedulerExternal.cs |   2 +-
 src/Lucene.Net.Tests/TestSearch.cs                 |   2 +-
 src/Lucene.Net.Tests/TestSearchForDuplicates.cs    |   4 +-
 .../Util/Automaton/TestCompiledAutomaton.cs        |  10 +-
 src/Lucene.Net.Tests/Util/Fst/TestBytesStore.cs    |  40 +-
 src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs          |  47 +--
 .../Util/Packed/TestEliasFanoSequence.cs           |   6 +-
 src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs |  21 +-
 .../Util/StressRamUsageEstimator.cs                |   8 +-
 src/Lucene.Net.Tests/Util/TestArrayUtil.cs         |   8 +-
 src/Lucene.Net.Tests/Util/TestBroadWord.cs         |   3 +-
 src/Lucene.Net.Tests/Util/TestCharsRef.cs          |   4 +-
 src/Lucene.Net.Tests/Util/TestFixedBitSet.cs       |   6 +-
 src/Lucene.Net.Tests/Util/TestLongBitSet.cs        |   6 +-
 src/Lucene.Net.Tests/Util/TestNumericUtils.cs      |   5 +-
 src/Lucene.Net.Tests/Util/TestOfflineSorter.cs     |   8 +-
 src/Lucene.Net.Tests/Util/TestOpenBitSet.cs        |   2 +-
 src/Lucene.Net.Tests/Util/TestPagedBytes.cs        |  13 +-
 src/Lucene.Net.Tests/Util/TestPriorityQueue.cs     |   2 +-
 .../Util/TestRamUsageEstimatorOnWildAnimals.cs     |   3 +-
 src/Lucene.Net.Tests/Util/TestRollingBuffer.cs     |   6 +-
 src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs       |   2 +-
 src/Lucene.Net.Tests/Util/TestWeakIdentityMap.cs   |   4 +-
 src/Lucene.Net/Analysis/Analyzer.cs                |   1 -
 src/Lucene.Net/Analysis/TokenFilter.cs             |   5 +-
 src/Lucene.Net/Codecs/Lucene40/BitVector.cs        |   8 +-
 src/Lucene.Net/Index/ConcurrentMergeScheduler.cs   |   5 +-
 src/Lucene.Net/Index/DirectoryReader.cs            |   2 +-
 src/Lucene.Net/Index/DocValues.cs                  |   6 +-
 src/Lucene.Net/Index/IndexWriter.cs                |  38 +-
 src/Lucene.Net/Index/IndexWriterConfig.cs          |   6 +-
 src/Lucene.Net/Index/LiveIndexWriterConfig.cs      |   4 +-
 src/Lucene.Net/Index/SegmentReader.cs              |   3 +-
 src/Lucene.Net/Lucene.Net.csproj                   |   5 -
 src/Lucene.Net/Search/ConstantScoreQuery.cs        |  12 +-
 src/Lucene.Net/Search/ExactPhraseScorer.cs         |   4 +-
 src/Lucene.Net/Search/FieldCacheImpl.cs            |  17 +-
 src/Lucene.Net/Search/QueryWrapperFilter.cs        |  33 +-
 .../Search/Similarities/DFRSimilarity.cs           |   4 +-
 src/Lucene.Net/Search/Weight.cs                    |   7 +-
 src/Lucene.Net/Store/FSDirectory.cs                |  13 +-
 .../Store/RateLimitedDirectoryWrapper.cs           |   7 +-
 src/Lucene.Net/Support/ConcurrentHashSet.cs        |   2 +-
 src/Lucene.Net/Support/Diagnostics/Debugging.cs    |  19 +-
 .../Document/Extensions/DocumentExtensions.cs      |   4 +-
 src/Lucene.Net/Support/Util/Properties.cs          |  19 +-
 src/Lucene.Net/Support/Util/SystemProperties.cs    |   2 +-
 src/Lucene.Net/Util/ArrayUtil.cs                   |  22 +-
 src/Lucene.Net/Util/Automaton/RegExp.cs            |   2 +-
 src/Lucene.Net/Util/BytesRefArray.cs               |   2 +-
 src/Lucene.Net/Util/CharsRef.cs                    |   4 +-
 src/Lucene.Net/Util/CommandLineUtil.cs             |   9 +-
 src/Lucene.Net/Util/FieldCacheSanityChecker.cs     |   2 +-
 src/Lucene.Net/Util/Fst/Util.cs                    |   1 -
 src/Lucene.Net/Util/NumericUtils.cs                |   8 +-
 src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs  |   2 +-
 src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs   |   2 +-
 src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj    |   5 -
 .../AspNetCoreReplicationRequest.cs                |   3 +-
 .../Lucene.Net.Replicator.AspNetCore.csproj        |   6 -
 .../Lucene.Net.Tests.ICU.csproj                    |   2 -
 .../Lucene.Net.Tests.Cli.csproj                    |   3 -
 .../lucene-cli/SourceCode/SourceCodeExporter.cs    |   2 -
 438 files changed, 2701 insertions(+), 1992 deletions(-)
 copy websites/site/lucenetemplate/web.config => NuGet.config (78%)
 create mode 100644 build/azure-templates/publish-test-binaries.yml
 delete mode 100644 src/Lucene.Net.TestFramework/Support/Attributes/LongRunningTestAttribute.cs
 create mode 100644 src/Lucene.Net.Tests.BenchmarkDotNet/IndexFilesBenchmarks.cs
 create mode 100644 src/Lucene.Net.Tests.BenchmarkDotNet/SearchFilesBenchmarks.cs
 create mode 100644 src/Lucene.Net.Tests.BenchmarkDotNet/Util/ContentGenerator.cs
 create mode 100644 src/Lucene.Net.Tests.BenchmarkDotNet/Util/PathUtil.cs


[lucenenet] 03/03: Lucene.Net.Tests.BenchmarkDotNet: Added benchmarks for IndexFiles and SearchFiles

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch benchmarkdotnet
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 19ce5e91bc7decbccd981bc11626bde3a91b90fc
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Mon Jul 20 17:51:21 2020 +0700

    Lucene.Net.Tests.BenchmarkDotNet: Added benchmarks for IndexFiles and SearchFiles
---
 .../IndexFilesBenchmarks.cs                        | 231 +++++++++++++++++++++
 .../Lucene.Net.Tests.BenchmarkDotNet.csproj        |   7 +
 .../SearchFilesBenchmarks.cs                       | 128 ++++++++++++
 .../Util/ContentGenerator.cs                       | 110 ++++++++++
 .../Util/PathUtil.cs                               |  64 ++++++
 5 files changed, 540 insertions(+)

diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/IndexFilesBenchmarks.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/IndexFilesBenchmarks.cs
new file mode 100644
index 0000000..3a9119e
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/IndexFilesBenchmarks.cs
@@ -0,0 +1,231 @@
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Configs;
+using BenchmarkDotNet.Jobs;
+using Lucene.Net.Analysis;
+using Lucene.Net.Analysis.Standard;
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Store;
+using Lucene.Net.Tests.BenchmarkDotNet.Util;
+using Lucene.Net.Util;
+using System;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Tests.BenchmarkDotNet
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    [MemoryDiagnoser]
+    [Config(typeof(Config))]
+    public class IndexFilesBenchmarks
+    {
+        private class Config : ManualConfig
+        {
+            public Config()
+            {
+                var baseJob = Job.MediumRun;
+
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00010").WithId("4.8.0-beta00010"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00009").WithId("4.8.0-beta00009"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00008").WithId("4.8.0-beta00008"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00007").WithId("4.8.0-beta00007"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00006").WithId("4.8.0-beta00006"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00005").WithId("4.8.0-beta00005"));
+            }
+        }
+
+        private static DirectoryInfo sourceDirectory;
+        private static DirectoryInfo indexDirectory;
+
+        [GlobalSetup]
+        public void GlobalSetUp()
+        {
+            sourceDirectory = PathUtil.CreateTempDir("sourceFiles");
+            int seed = 2342;
+            ContentGenerator.GenerateFiles(new Random(seed), sourceDirectory.FullName, 250);
+        }
+
+        [GlobalCleanup]
+        public void GlobalTearDown()
+        {
+            try
+            {
+                if (System.IO.Directory.Exists(sourceDirectory.FullName))
+                    System.IO.Directory.Delete(sourceDirectory.FullName, recursive: true);
+            }
+            catch { }
+        }
+
+        [IterationSetup]
+        public void IterationSetUp()
+        {
+            indexDirectory = PathUtil.CreateTempDir("indexFiles");
+        }
+
+        [IterationCleanup]
+        public void IterationTearDown()
+        {
+            try
+            {
+                if (System.IO.Directory.Exists(indexDirectory.FullName))
+                    System.IO.Directory.Delete(indexDirectory.FullName, recursive: true);
+            }
+            catch { }
+
+        }
+
+        /// <summary>Index all text files under a directory.</summary>
+        [Benchmark]
+        public void IndexFiles() => IndexFiles(sourceDirectory, indexDirectory);
+
+        /// <summary>Index all text files under a directory.</summary>
+        public static void IndexFiles(DirectoryInfo sourceDirectory, DirectoryInfo indexDirectory)
+        {
+            string indexPath = indexDirectory.FullName;
+            
+            bool create = true;
+
+            Store.Directory dir = FSDirectory.Open(indexPath);
+            // :Post-Release-Update-Version.LUCENE_XY:
+            Analyzer analyzer = new StandardAnalyzer(LuceneVersion.LUCENE_48);
+            IndexWriterConfig iwc = new IndexWriterConfig(LuceneVersion.LUCENE_48, analyzer);
+
+            if (create)
+            {
+                // Create a new index in the directory, removing any
+                // previously indexed documents:
+                iwc.OpenMode = OpenMode.CREATE;
+            }
+            else
+            {
+                // Add new documents to an existing index:
+                iwc.OpenMode = OpenMode.CREATE_OR_APPEND;
+            }
+
+            // Optional: for better indexing performance, if you
+            // are indexing many documents, increase the RAM
+            // buffer.
+            //
+            // iwc.RAMBufferSizeMB = 256.0;
+
+            using (IndexWriter writer = new IndexWriter(dir, iwc))
+            {
+                IndexDocs(writer, sourceDirectory);
+
+                // NOTE: if you want to maximize search performance,
+                // you can optionally call forceMerge here.  This can be
+                // a terribly costly operation, so generally it's only
+                // worth it when your index is relatively static (ie
+                // you're done adding documents to it):
+                //
+                // writer.ForceMerge(1);
+            }
+        }
+
+        /// <summary>
+        /// Recurses over files and directories found under the 
+        /// given directory and indexes each file.<para/>
+        /// 
+        /// NOTE: This method indexes one document per input file. 
+        /// This is slow. For good throughput, put multiple documents 
+        /// into your input file(s).
+        /// </summary>
+        /// <param name="writer">
+        ///     <see cref="IndexWriter"/> to the index where the given 
+        ///     file/dir info will be stored
+        /// </param>
+        /// <param name="directoryInfo">
+        ///     The directory to recurse into to find files to index.
+        /// </param>
+        /// <exception cref="IOException">
+        ///     If there is a low-level I/O error.
+        /// </exception>
+        internal static void IndexDocs(IndexWriter writer, DirectoryInfo directoryInfo)
+        {
+            foreach (var dirInfo in directoryInfo.GetDirectories())
+            {
+                IndexDocs(writer, dirInfo);
+            }
+            foreach (var fileInfo in directoryInfo.GetFiles())
+            {
+                IndexDocs(writer, fileInfo);
+            }
+        }
+
+        /// <summary>
+        /// Indexes the given file using the given writer.<para/>
+        /// </summary>
+        /// <param name="writer">
+        ///     <see cref="IndexWriter"/> to the index where the given 
+        ///     file info will be stored.
+        /// </param>
+        /// <param name="file">
+        ///     The file to index.
+        /// </param>
+        /// <exception cref="IOException">
+        ///     If there is a low-level I/O error.
+        /// </exception>
+        internal static void IndexDocs(IndexWriter writer, FileInfo file)
+        {
+            using (FileStream fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
+            {
+                // make a new, empty document
+                Document doc = new Document();
+
+                // Add the path of the file as a field named "path".  Use a
+                // field that is indexed (i.e. searchable), but don't tokenize 
+                // the field into separate words and don't index term frequency
+                // or positional information:
+                Field pathField = new StringField("path", file.FullName, Field.Store.YES);
+                doc.Add(pathField);
+
+                // Add the last modified date of the file a field named "modified".
+                // Use a LongField that is indexed (i.e. efficiently filterable with
+                // NumericRangeFilter).  This indexes to milli-second resolution, which
+                // is often too fine.  You could instead create a number based on
+                // year/month/day/hour/minutes/seconds, down the resolution you require.
+                // For example the long value 2011021714 would mean
+                // February 17, 2011, 2-3 PM.
+                doc.Add(new Int64Field("modified", file.LastWriteTimeUtc.Ticks, Field.Store.NO));
+
+                // Add the contents of the file to a field named "contents".  Specify a Reader,
+                // so that the text of the file is tokenized and indexed, but not stored.
+                // Note that FileReader expects the file to be in UTF-8 encoding.
+                // If that's not the case searching for special characters will fail.
+                doc.Add(new TextField("contents", new StreamReader(fs, Encoding.UTF8)));
+
+                if (writer.Config.OpenMode == OpenMode.CREATE)
+                {
+                    // New index, so we just add the document (no old document can be there):
+                    //Console.WriteLine("adding " + file);
+                    writer.AddDocument(doc);
+                }
+                else
+                {
+                    // Existing index (an old copy of this document may have been indexed) so 
+                    // we use updateDocument instead to replace the old one matching the exact 
+                    // path, if present:
+                    //Console.WriteLine("updating " + file);
+                    writer.UpdateDocument(new Term("path", file.FullName), doc);
+                }
+            }
+        }
+    }
+}
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj b/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj
index 5d4af5a..781c661 100644
--- a/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj
@@ -12,6 +12,13 @@
 
   <ItemGroup>
     <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00005" />
+    <PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00005" />
+  </ItemGroup>
+  
+  <ItemGroup>
+    <Compile Include="..\Lucene.Net.TestFramework\Support\Randomized\Generators\RandomPicks.cs" LinkBase="Util" />
+    <Compile Include="..\Lucene.Net.TestFramework\Support\Randomized\Generators\RandomInts.cs" LinkBase="Util" />
+    <Compile Include="..\Lucene.Net\Support\ExceptionToNetNumericConventionAttribute.cs" LinkBase="Util" />
   </ItemGroup>
 
 </Project>
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/SearchFilesBenchmarks.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/SearchFilesBenchmarks.cs
new file mode 100644
index 0000000..3c2c45a
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/SearchFilesBenchmarks.cs
@@ -0,0 +1,128 @@
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Configs;
+using BenchmarkDotNet.Jobs;
+using Lucene.Net.Analysis;
+using Lucene.Net.Analysis.Standard;
+using Lucene.Net.Index;
+using Lucene.Net.QueryParsers.Classic;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Search;
+using Lucene.Net.Store;
+using Lucene.Net.Tests.BenchmarkDotNet.Util;
+using Lucene.Net.Util;
+using System;
+using System.IO;
+
+namespace Lucene.Net.Tests.BenchmarkDotNet
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    [MemoryDiagnoser]
+    [Config(typeof(Config))]
+    public class SearchFilesBenchmarks
+    {
+        private class Config : ManualConfig
+        {
+            public Config()
+            {
+                var baseJob = Job.MediumRun;
+
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00010").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00010").WithId("4.8.0-beta00010"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00009").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00009").WithId("4.8.0-beta00009"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00008").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00008").WithId("4.8.0-beta00008"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00007").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00007").WithId("4.8.0-beta00007"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00006").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00006").WithId("4.8.0-beta00006"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00005").WithNuGet("Lucene.Net.QueryParser", "4.8.0-beta00005").WithId("4.8.0-beta00005"));
+            }
+        }
+
+        private const string QueryString = "settings";
+        private static DirectoryInfo indexDirectory;
+
+        [GlobalSetup]
+        public void GlobalSetUp()
+        {
+            var sourceDirectory = PathUtil.CreateTempDir("sourceFiles");
+
+            // Generate content to index (including our string that we will search for)
+            int seed = 2342;
+            ContentGenerator.GenerateFiles(new Random(seed), sourceDirectory.FullName, 1000, QueryString);
+
+            
+            // Index the content
+            indexDirectory = PathUtil.CreateTempDir("indexFiles");
+            IndexFilesBenchmarks.IndexFiles(sourceDirectory, indexDirectory);
+
+            // Cleanup our source files, they are no longer needed
+            try
+            {
+                if (System.IO.Directory.Exists(sourceDirectory.FullName))
+                    System.IO.Directory.Delete(sourceDirectory.FullName, recursive: true);
+            }
+            catch { }
+        }
+
+        [GlobalCleanup]
+        public void GlobalTearDown()
+        {
+            try
+            {
+                if (System.IO.Directory.Exists(indexDirectory.FullName))
+                    System.IO.Directory.Delete(indexDirectory.FullName, recursive: true);
+            }
+            catch { }
+        }
+
+        [Benchmark]
+        public void SearchFiles()
+        {
+
+            string index = indexDirectory.FullName;
+            string field = "contents";
+            //string queries = null;
+            int repeat = 1000;
+            //bool raw = false;
+            string queryString = QueryString;
+            //int hitsPerPage = 10;
+
+            using (IndexReader reader = DirectoryReader.Open(FSDirectory.Open(index)))
+            {
+                IndexSearcher searcher = new IndexSearcher(reader);
+                // :Post-Release-Update-Version.LUCENE_XY:
+                Analyzer analyzer = new StandardAnalyzer(LuceneVersion.LUCENE_48);
+
+                // :Post-Release-Update-Version.LUCENE_XY:
+                QueryParser parser = new QueryParser(LuceneVersion.LUCENE_48, field, analyzer);
+
+                Query query = parser.Parse(queryString.Trim());
+                //Console.WriteLine("Searching for: " + query.ToString(field));
+
+                // repeat & time as benchmark
+                {
+                    //DateTime start = DateTime.UtcNow;
+                    for (int i = 0; i < repeat; i++)
+                    {
+                        searcher.Search(query, null, 100);
+                    }
+                    //DateTime end = DateTime.UtcNow;
+                    //Console.WriteLine("Time: " + (end - start).TotalMilliseconds + "ms");
+                }
+            } // Disposes reader
+        }
+    }
+}
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/Util/ContentGenerator.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/Util/ContentGenerator.cs
new file mode 100644
index 0000000..15612e9
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/Util/ContentGenerator.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Randomized.Generators
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    public static class ContentGenerator
+    {
+        public static void GenerateFiles(Random random, string directory, int numberOfFiles, params string[] stringsToQuery)
+        {
+            var subdirectories = new HashSet<string>();
+            for (int i = 0; i < numberOfFiles; i++)
+            {
+                bool root = random.Next(1, 100) > 50;
+
+                if (root)
+                {
+                    GenerateFile(random, directory, stringsToQuery);
+                }
+                else
+                {
+                    string subdirectory;
+                    if (subdirectories.Count > 0 && random.Next(1, 100) > 30)
+                    {
+                        subdirectory = RandomPicks.RandomFrom(random, subdirectories);
+                    }
+                    else
+                    {
+                        subdirectory = RandomSimpleString(random, 5, 20);
+                        subdirectories.Add(subdirectory);
+                    }
+                    GenerateFile(random, Path.Combine(directory, subdirectory), stringsToQuery);
+                }
+            }
+        }
+
+        private static void GenerateFile(Random random, string directory, ICollection<string> stringsToQuery)
+        {
+            if (!System.IO.Directory.Exists(directory))
+                System.IO.Directory.CreateDirectory(directory);
+
+            string fileName = RandomSimpleString(random, 5, 25) + ".txt";
+            int paragraphs = random.Next(5, 25);
+
+            using (var writer = new StreamWriter(Path.Combine(directory, fileName), append: false, encoding: Encoding.UTF8))
+            {
+                for (int i = 0; i < paragraphs; i++)
+                {
+                    WriteParagraph(random, writer, stringsToQuery);
+                }
+            }
+        }
+
+        private static void WriteParagraph(Random random, TextWriter writer, ICollection<string> stringsToQuery)
+        {
+            int words = random.Next(50, 100);
+            bool addStringsToQuery = stringsToQuery != null && stringsToQuery.Count > 0;
+
+            for (int i = 0; i < words; i++)
+            {
+                if (addStringsToQuery && random.Next(1, 1500) == 668)
+                    writer.Write(RandomPicks.RandomFrom(random, stringsToQuery));
+                else
+                    writer.Write(RandomSimpleString(random, 1, 8));
+
+                if (i + 1 < words)
+                    writer.Write(" ");
+            }
+            writer.WriteLine(".");
+            writer.WriteLine();
+        }
+
+        /// <summary>
+        /// Returns a random string consisting only of lowercase characters 'a' through 'z'.
+        /// </summary>
+        public static string RandomSimpleString(Random r, int minLength, int maxLength)
+        {
+            int end = RandomInts.RandomInt32Between(r, minLength, maxLength);
+            if (end == 0)
+            {
+                // allow 0 length
+                return "";
+            }
+            char[] buffer = new char[end];
+            for (int i = 0; i < end; i++)
+            {
+                buffer[i] = (char)RandomInts.RandomInt32Between(r, 'a', 'z');
+            }
+            return new string(buffer, 0, end);
+        }
+    }
+}
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/Util/PathUtil.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/Util/PathUtil.cs
new file mode 100644
index 0000000..aaf9c86
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/Util/PathUtil.cs
@@ -0,0 +1,64 @@
+using System;
+using System.IO;
+
+namespace Lucene.Net.Tests.BenchmarkDotNet.Util
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    public static class PathUtil
+    {
+        private const int TEMP_NAME_RETRY_THRESHOLD = 9999;
+
+        public static DirectoryInfo CreateTempDir(string prefix)
+        {
+            //DirectoryInfo @base = BaseTempDirForTestClass();
+
+            int attempt = 0;
+            DirectoryInfo f;
+            bool iterate = true;
+            do
+            {
+                if (attempt++ >= TEMP_NAME_RETRY_THRESHOLD)
+                {
+                    throw new Exception("Failed to get a temporary name too many times, check your temp directory and consider manually cleaning it: " + System.IO.Path.GetTempPath());
+                }
+                // LUCENENET specific - need to use a random file name instead of a sequential one or two threads may attempt to do 
+                // two operations on a file at the same time.
+                //f = new DirectoryInfo(Path.Combine(System.IO.Path.GetTempPath(), "LuceneTemp", prefix + "-" + attempt));
+                f = new DirectoryInfo(Path.Combine(System.IO.Path.GetTempPath(), "LuceneTemp", prefix + "-" + Path.GetFileNameWithoutExtension(Path.GetRandomFileName())));
+
+                try
+                {
+                    if (!System.IO.Directory.Exists(f.FullName))
+                    {
+                        f.Create();
+                        iterate = false;
+                    }
+                }
+#pragma warning disable 168
+                catch (IOException exc)
+#pragma warning restore 168
+                {
+                    iterate = true;
+                }
+            } while (iterate);
+
+            return f;
+        }
+    }
+}


[lucenenet] 01/03: Adds simple benchmark between nuget versions

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch benchmarkdotnet
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit b80ccdd327221bbd160e4d3489d97a2b2647f036
Author: Shannon <sd...@gmail.com>
AuthorDate: Wed Jul 15 14:29:23 2020 +1000

    Adds simple benchmark between nuget versions
---
 Lucene.Net.sln                                     |   6 ++
 .../HomePageScriptBenchmarks.cs                    | 112 +++++++++++++++++++++
 .../Lucene.Net.Tests.BenchmarkDotNet.csproj        |  17 ++++
 src/Lucene.Net.Tests.BenchmarkDotNet/Program.cs    |  26 +++++
 4 files changed, 161 insertions(+)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index aa712c3..b06282b 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -201,6 +201,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.CodeAnalysis", "
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests.CodeAnalysis", "src\dotnet\Lucene.Net.Tests.CodeAnalysis\Lucene.Net.Tests.CodeAnalysis.csproj", "{158F5D30-8B96-4C49-9009-0B8ACEDF8546}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.BenchmarkDotNet", "src\Lucene.Net.Tests.BenchmarkDotNet\Lucene.Net.Tests.BenchmarkDotNet.csproj", "{0C476146-411E-4C94-8A59-726A5F982A89}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -463,6 +465,10 @@ Global
 		{158F5D30-8B96-4C49-9009-0B8ACEDF8546}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{158F5D30-8B96-4C49-9009-0B8ACEDF8546}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{158F5D30-8B96-4C49-9009-0B8ACEDF8546}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0C476146-411E-4C94-8A59-726A5F982A89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0C476146-411E-4C94-8A59-726A5F982A89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0C476146-411E-4C94-8A59-726A5F982A89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0C476146-411E-4C94-8A59-726A5F982A89}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs
new file mode 100644
index 0000000..37ac4b2
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs
@@ -0,0 +1,112 @@
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Configs;
+using BenchmarkDotNet.Jobs;
+using Lucene.Net.Util;
+using Lucene.Net.Store;
+using Lucene.Net.Analysis.Standard;
+using Lucene.Net.Index;
+using Lucene.Net.Documents;
+using Lucene.Net.Search;
+using System.Diagnostics;
+
+namespace Lucene.Net.Tests.BenchmarkDotNet
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    [MemoryDiagnoser]
+    [Config(typeof(Config))]
+    public class HomePageScriptBenchmarks
+    {
+        private class Config : ManualConfig
+        {
+            public Config()
+            {
+                var baseJob = Job.MediumRun;
+
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00009").WithId("4.8.0-beta00009"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00008").WithId("4.8.0-beta00008"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00007").WithId("4.8.0-beta00007"));
+            }
+        }
+
+        private const int _directoryWriterIterations = 10;
+        private const int _indexSearchIterations = 25;
+
+        [Benchmark]
+        public void HomePageScript()
+        {
+            // Ensures index backwards compatibility
+            var AppLuceneVersion = LuceneVersion.LUCENE_48;
+
+            for (int d = 0; d < _directoryWriterIterations; d++)
+            {
+                using var dir = new RAMDirectory();
+
+                //create an analyzer to process the text
+                var analyzer = new StandardAnalyzer(AppLuceneVersion);
+
+                //create an index writer
+                var indexConfig = new IndexWriterConfig(AppLuceneVersion, analyzer);
+                using var writer = new IndexWriter(dir, indexConfig);
+
+                for (int i = 0; i < _indexSearchIterations; i++)
+                {
+                    var source = new
+                    {
+                        Name = $"Kermit{i} the Frog{i}",
+                        FavoritePhrase = $"The quick{i} brown{i} fox{i} jumps{i} over{i} the lazy{i} dog{i} "
+                    };
+                    Document doc = new Document
+                    {
+                        // StringField indexes but doesn't tokenize
+                        new StringField("name", source.Name, Field.Store.YES),
+                        new TextField("favoritePhrase", source.FavoritePhrase, Field.Store.YES)
+                    };
+
+                    writer.AddDocument(doc);
+                    writer.Flush(triggerMerge: false, applyAllDeletes: false);
+                }
+
+                for (int i = 0; i < _indexSearchIterations; i++)
+                {
+                    // search with a phrase
+                    var phrase = new MultiPhraseQuery
+                    {
+                        new Term("favoritePhrase", $"brown{i}"),
+                        new Term("favoritePhrase", $"fox{i}")
+                    };
+
+                    // re-use the writer to get real-time updates
+                    using var reader = writer.GetReader(applyAllDeletes: true);
+                    var searcher = new IndexSearcher(reader);
+                    var hits = searcher.Search(phrase, 20 /* top 20 */).ScoreDocs;
+                    Debug.Assert(hits.Length > 0);
+                    foreach (var hit in hits)
+                    {
+                        var foundDoc = searcher.Doc(hit.Doc);
+                        var score = hit.Score;
+                        var name = foundDoc.Get("name");
+                        var favoritePhrase = foundDoc.Get("favoritePhrase");
+                    }
+                }
+            }
+        }
+
+    }
+}
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj b/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj
new file mode 100644
index 0000000..5d4af5a
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/Lucene.Net.Tests.BenchmarkDotNet.csproj
@@ -0,0 +1,17 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
+    <PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00005" />
+  </ItemGroup>
+
+</Project>
diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/Program.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/Program.cs
new file mode 100644
index 0000000..c65ec22
--- /dev/null
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/Program.cs
@@ -0,0 +1,26 @@
+using BenchmarkDotNet.Running;
+
+namespace Lucene.Net.Tests.BenchmarkDotNet
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    class Program
+    {
+        private static void Main(string[] args) => new BenchmarkSwitcher(typeof(Program).Assembly).Run(args);
+    }
+}


[lucenenet] 02/03: Lucene.Net.Tests.BenchmarkDotNet: Updated HomePageScripBenchmarks to include beta 5, beta 6, and beta 10

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch benchmarkdotnet
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit e11b441a9525f12c59dd5f97ba49081a3e3b46b1
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Mon Jul 20 17:48:10 2020 +0700

    Lucene.Net.Tests.BenchmarkDotNet: Updated HomePageScripBenchmarks to include beta 5, beta 6, and beta 10
---
 src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs b/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs
index 37ac4b2..6abebbd 100644
--- a/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs
+++ b/src/Lucene.Net.Tests.BenchmarkDotNet/HomePageScriptBenchmarks.cs
@@ -39,9 +39,12 @@ namespace Lucene.Net.Tests.BenchmarkDotNet
             {
                 var baseJob = Job.MediumRun;
 
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00010").WithId("4.8.0-beta00010"));
                 AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00009").WithId("4.8.0-beta00009"));
                 AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00008").WithId("4.8.0-beta00008"));
                 AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00007").WithId("4.8.0-beta00007"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00006").WithId("4.8.0-beta00006"));
+                AddJob(baseJob.WithNuGet("Lucene.Net.Analysis.Common", "4.8.0-beta00005").WithId("4.8.0-beta00005"));
             }
         }