# HG changeset patch # User paulb # Date 1106570818 0 # Node ID f042003c3cde3281bd962a638022f0bbc471bd74 # Parent 366550ef6c84e68954f99eb6155fc4c6d0e7c0a0 [project @ 2005-01-24 12:46:58 by paulb] Added the controversial "begat" benchmark. diff -r 366550ef6c84 -r f042003c3cde tests/begat.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/begat.py Mon Jan 24 12:46:58 2005 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import libxml2macro as n_ +import time, os + +raw_input("Start your engines with ps -p %s -fv" % os.getpid()) +t = time.time() + +l = [] +n_doc = parseFile("ot.xml") +for n_node in n_doc.xpath("//v[contains(text(), 'begat')]"): + text = n_node.nodeValue + l.append(text) + +#for n_node in n_doc.xpath("//v"): +# text = n_node.nodeValue +# if text.find(u'begat') != -1: +# print text + +print "Time taken", time.time() - t +raw_input("Stop your engines!") + +print l + +# vim: tabstop=4 expandtab shiftwidth=4