6
6
# The ASF licenses this file to You under the Apache License, Version 2.0
7
7
# (the "License"); you may not use this file except in compliance with
8
8
# the License. You may obtain a copy of the License at
9
- #
9
+ #
10
10
# http://www.apache.org/licenses/LICENSE-2.0
11
- #
11
+ #
12
12
# Unless required by applicable law or agreed to in writing, software
13
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -600,9 +600,9 @@ def runNRTTest(r, indexPath, runLogDir):
600
600
601
601
min , max , mean , stdDev = stats .getStats (times )
602
602
message ('NRT reopen time (msec) mean=%.4f stdDev=%.4f' % (mean , stdDev ))
603
-
603
+
604
604
checkIndex (r , indexPath , '%s/checkIndex.nrt.log' % runLogDir )
605
-
605
+
606
606
return mean , stdDev
607
607
608
608
def run ():
@@ -692,7 +692,7 @@ def run():
692
692
print ('Unable to read /sys/kernel/mm/transparent_hugepage/enabled' )
693
693
else :
694
694
print ('transparent_hugepages: %s' % s )
695
-
695
+
696
696
runCommand ('%s clean > clean.log 2>&1' % constants .ANT_EXE )
697
697
698
698
r = benchUtil .RunAlgs (constants .JAVA_COMMAND , True , True )
@@ -779,7 +779,7 @@ def run():
779
779
index = index ,
780
780
directory = DIR_IMPL ,
781
781
commitPoint = 'multi' )
782
-
782
+
783
783
#c = benchUtil.Competitor(id, 'trunk.nightly', index, DIR_IMPL, 'StandardAnalyzerNoStopWords', 'multi', constants.WIKI_MEDIUM_TASKS_FILE)
784
784
785
785
if REAL :
@@ -827,15 +827,15 @@ def run():
827
827
if REAL :
828
828
resultsNow = []
829
829
for iter in xrange (JVM_COUNT ):
830
- seed = rand .randint (- 10000000 , 1000000 )
830
+ seed = rand .randint (- 10000000 , 1000000 )
831
831
resultsNow .append (r .runSimpleSearchBench (iter , id , comp , coldRun , seed , staticSeed , filter = None ))
832
832
else :
833
833
resultsNow = ['%s/%s/modules/benchmark/%s.%s.x.%d' % (constants .BASE_DIR , NIGHTLY_DIR , id , comp .name , iter ) for iter in xrange (20 )]
834
834
message ('done search (%s)' % (now ()- t0 ))
835
835
resultsPrev = []
836
836
837
837
searchResults = searchHeap = None
838
-
838
+
839
839
for fname in resultsNow :
840
840
prevFName = fname + '.prev'
841
841
if os .path .exists (prevFName ):
@@ -965,7 +965,7 @@ def makeGraphs():
965
965
966
966
tup = cPickle .loads (open (resultsFile ).read ())
967
967
# print 'RESULTS: %s' % resultsFile
968
-
968
+
969
969
timeStamp , \
970
970
medNumDocs , medIndexTimeSec , medBytesIndexed , \
971
971
bigNumDocs , bigIndexTimeSec , bigBytesIndexed , \
@@ -984,7 +984,7 @@ def makeGraphs():
984
984
searchHeaps = tup [11 ]
985
985
else :
986
986
searchHeaps = None
987
-
987
+
988
988
timeStampString = '%04d-%02d-%02d %02d:%02d:%02d' % \
989
989
(timeStamp .year ,
990
990
timeStamp .month ,
@@ -1117,7 +1117,7 @@ def writeCheckIndexTimeHTML():
1117
1117
if os .path .exists ('%s/%s/results.debug.pk' % (constants .NIGHTLY_LOG_DIR , subDir )):
1118
1118
# Skip debug runs
1119
1119
continue
1120
-
1120
+
1121
1121
tup = subDir .split ('.' )
1122
1122
if len (tup ) != 6 :
1123
1123
#print('skip %s' % subDir)
@@ -1126,7 +1126,7 @@ def writeCheckIndexTimeHTML():
1126
1126
if tup [:3 ] == ['2015' , '04' , '04' ]:
1127
1127
# Hide disastrously slow CheckIndex time after auto-prefix first landed
1128
1128
continue
1129
-
1129
+
1130
1130
if os .path .exists (checkIndexTimeFile ):
1131
1131
# Already previously computed & cached:
1132
1132
seconds = int (open (checkIndexTimeFile , 'r' ).read ())
@@ -1157,7 +1157,7 @@ def writeCheckIndexTimeHTML():
1157
1157
#print("tup %s" % tup)
1158
1158
chartData .append ('%s-%s-%s %s:%s:%s,%s' % (tuple (tup ) + (seconds ,)))
1159
1159
#print("added %s" % chartData[-1])
1160
-
1160
+
1161
1161
with open ('%s/checkIndexTime.html' % constants .NIGHTLY_REPORTS_DIR , 'wb' ) as f :
1162
1162
w = f .write
1163
1163
header (w , 'Lucene nightly CheckIndex time' )
@@ -1181,7 +1181,7 @@ def writeCheckIndexTimeHTML():
1181
1181
w ('</ul>' )
1182
1182
w ('<br><a href="index.html">Back to all results</a><br>' )
1183
1183
footer (w )
1184
-
1184
+
1185
1185
def header (w , title ):
1186
1186
w ('<html>' )
1187
1187
w ('<head>' )
@@ -1192,7 +1192,7 @@ def header(w, title):
1192
1192
w ('<script type="text/javascript" src="dygraph-combined-dev.js"></script>\n ' )
1193
1193
w ('</head>' )
1194
1194
w ('<body>' )
1195
-
1195
+
1196
1196
def footer (w ):
1197
1197
w ('<br><em>[last updated: %s; send questions to <a href="mailto:lucene@mikemccandless.com">Mike McCandless</a>]</em>' % now ())
1198
1198
w ('</div>' )
@@ -1202,7 +1202,7 @@ def footer(w):
1202
1202
def writeOneLine (w , seen , cat , desc ):
1203
1203
seen .add (cat )
1204
1204
w ('<br> <a href="%s.html">%s</a>' % (cat , desc ))
1205
-
1205
+
1206
1206
def writeIndexHTML (searchChartData , days ):
1207
1207
f = open ('%s/index.html' % constants .NIGHTLY_REPORTS_DIR , 'wb' )
1208
1208
w = f .write
@@ -1231,6 +1231,7 @@ def writeIndexHTML(searchChartData, days):
1231
1231
writeOneLine (w , done , 'Phrase' , 'Exact phrase' )
1232
1232
writeOneLine (w , done , 'SloppyPhrase' , 'Sloppy (~4) phrase' )
1233
1233
writeOneLine (w , done , 'SpanNear' , 'Span near (~10)' )
1234
+ writeOneLine (w , done , 'IntervalsOrdered' , 'Ordered intervals (MAXWIDTH/10)' )
1234
1235
1235
1236
w ('<br><br><b>FuzzyQuery:</b>' )
1236
1237
writeOneLine (w , done , 'Fuzzy1' , 'Edit distance 1' )
@@ -1240,10 +1241,10 @@ def writeIndexHTML(searchChartData, days):
1240
1241
writeOneLine (w , done , 'Term' , 'TermQuery' )
1241
1242
writeOneLine (w , done , 'Respell' , 'Respell (DirectSpellChecker)' )
1242
1243
writeOneLine (w , done , 'PKLookup' , 'Primary key lookup' )
1243
- writeOneLine (w , done , 'Wildcard' , 'WildcardQuery' )
1244
- writeOneLine (w , done , 'Prefix3' , 'PrefixQuery (3 leading characters)' )
1245
- writeOneLine (w , done , 'IntNRQ' , 'Numeric range filtering on last-modified-datetime' )
1246
-
1244
+ writeOneLine (w , done , 'Wildcard' , 'WildcardQuery' )
1245
+ writeOneLine (w , done , 'Prefix3' , 'PrefixQuery (3 leading characters)' )
1246
+ writeOneLine (w , done , 'IntNRQ' , 'Numeric range filtering on last-modified-datetime' )
1247
+
1247
1248
w ('<br><br><b>Faceting:</b>' )
1248
1249
writeOneLine (w , done , 'TermDateFacets' , 'Term query + date hierarchy' )
1249
1250
writeOneLine (w , done , 'BrowseDateTaxoFacets' , 'All dates hierarchy' )
@@ -1270,7 +1271,7 @@ def writeIndexHTML(searchChartData, days):
1270
1271
w ('<br> <a href="sparseResults.html">Sparse vs dense doc values performance on NYC taxi ride corpus</a>' )
1271
1272
w ('<br> <a href="antcleantest.html">"ant clean test" time in lucene</a>' )
1272
1273
w ('<br> <a href="checkIndexTime.html">CheckIndex time</a>' )
1273
-
1274
+
1274
1275
l = searchChartData .keys ()
1275
1276
lx = []
1276
1277
for s in l :
@@ -1310,6 +1311,7 @@ def writeIndexHTML(searchChartData, days):
1310
1311
'Phrase' : 'PhraseQuery (exact)' ,
1311
1312
'SloppyPhrase' : 'PhraseQuery (sloppy)' ,
1312
1313
'SpanNear' : 'SpanNearQuery' ,
1314
+ 'IntervalsOrdered' : 'IntervalsQuery (ordered)' ,
1313
1315
'AndHighHigh' : 'BooleanQuery (AND, high freq, high freq term)' ,
1314
1316
'AndHighMed' : 'BooleanQuery (AND, high freq, medium freq term)' ,
1315
1317
'OrHighHigh' : 'BooleanQuery (OR, high freq, high freq term)' ,
@@ -1397,7 +1399,7 @@ def writeIndexingHTML(medChartData, bigChartData, gcTimesChartData):
1397
1399
w (' <li> Test does <b>not wait for merges on close</b> (calls <tt>IW.close(false)</tt>)' )
1398
1400
w (' <li> Analyzer is <tt>StandardAnalyzer</tt>, but we <b>index all stop words</b>' )
1399
1401
w (' <li> Test indexes full <a href="http://en.wikipedia.org/wiki/Wikipedia:Database_download">Wikipedia English XML export</a> (1/15/2011), from a pre-created line file (one document per line), on a different drive from the one that stores the index' )
1400
- w (' <li> %d indexing threads\n ' % constants .INDEX_NUM_THREADS )
1402
+ w (' <li> %d indexing threads\n ' % constants .INDEX_NUM_THREADS )
1401
1403
w (' <li> %s MB RAM buffer\n ' % INDEXING_RAM_BUFFER_MB )
1402
1404
w (' <li> Java command-line: <tt>%s</tt>\n ' % constants .JAVA_COMMAND )
1403
1405
w (' <li> Java version: <tt>%s</tt>\n ' % htmlEscape (os .popen ('java -version 2>&1' ).read ().strip ()))
@@ -1418,7 +1420,7 @@ def writeNRTHTML(nrtChartData):
1418
1420
w ('<br>' )
1419
1421
w (getOneGraphHTML ('NRT' , nrtChartData , "Milliseconds" , "Time (msec) to open a new reader" , errorBars = True ))
1420
1422
writeKnownChanges (w )
1421
-
1423
+
1422
1424
w ('<b>Notes</b>:\n ' )
1423
1425
w ('<ul>\n ' )
1424
1426
w (' <li> Test starts from full Wikipedia index, then use <tt>IW.updateDocument</tt> (so we stress deletions)' )
@@ -1501,15 +1503,15 @@ def getOneGraphHTML(id, data, yLabel, title, errorBars=True, pctOffset=5):
1501
1503
maxY = max ([float (x .split (',' )[1 ]) for x in data [1 :]])
1502
1504
options .append ('valueRange:[0,%.3f]' % (maxY * 1.25 ))
1503
1505
#options.append('includeZero: true')
1504
-
1506
+
1505
1507
if errorBars :
1506
1508
options .append ('errorBars: true' )
1507
1509
options .append ('sigma: 1' )
1508
1510
1509
1511
options .append ('showRoller: false' )
1510
1512
1511
1513
w (' {%s}' % ', ' .join (options ))
1512
-
1514
+
1513
1515
if 0 :
1514
1516
if errorBars :
1515
1517
w (' {errorBars: true, valueRange:[0,%.3f], sigma:1, title:"%s", ylabel:"%s", xlabel:"Date"}' % (maxY * 1.25 , title , yLabel ))
@@ -1597,12 +1599,11 @@ def sendEmail(toEmailAddr, subject, messageText):
1597
1599
if not DEBUG and REAL :
1598
1600
import socket
1599
1601
sendEmail ('mail@mikemccandless.com' , 'Nightly Lucene bench FAILED (%s)' % socket .gethostname (), '' )
1600
-
1602
+
1601
1603
# scp -rp /lucene/reports.nightly mike@10.17.4.9:/usr/local/apache2/htdocs
1602
1604
1603
1605
# TO CLEAN
1604
1606
# - rm -rf /p/lucene/indices/trunk.nightly.index.prev/
1605
1607
# - rm -rf /lucene/logs.nightly/*
1606
1608
# - rm -rf /lucene/reports.nightly/*
1607
1609
# - rm -f /lucene/trunk.nightly/modules/benchmark/*.x
1608
-
0 commit comments