r84770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84769‎ | r84770 | r84771 >
Date:21:42, 25 March 2011
Author:diederik
Status:deferred
Tags:
Comment:
Additional logging messages.
Modified paths:
  • /trunk/tools/editor_trends/etl/enricher.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/enricher.py
@@ -322,6 +322,13 @@
323323 counts.setdefault(contributor['username'], 0)
324324 counts[contributor['username']] += 1
325325 revision.clear()
 326+ print '************************'
 327+ gc.DEBUG_COLLECTABLE
 328+ gc.DEBUG_UNCOLLECTABLE
 329+ gc.DEBUG_STATS
 330+ print '************************'
 331+ gc.collect()
 332+ print gc.get_count()
326333
327334 article = None
328335 return counts
@@ -394,7 +401,8 @@
395402 elif event == 'end' and elem.tag == 'id' and id == False:
396403 article[elem.tag] = elem
397404 id = True
398 -
 405+ else:
 406+ event.clear()
399407 root.clear()
400408 return article
401409
@@ -433,14 +441,8 @@
434442
435443 if i % 1000 == 0:
436444 print 'Worker %s parsed %s articles' % (id, i)
437 - print '************************'
438 - gc.DEBUG_COLLECTABLE
439 - gc.DEBUG_UNCOLLECTABLE
440 - gc.DEBUG_STATS
441 - print '************************'
442 - gc.collect()
443 - print gc.get_count()
444445
 446+
445447 if dataset == 'training':
446448 cache.empty()
447449 cache.stats.summary()

Status & tagging log