def test_timing(self):
	# Test some timing aspects of heap traversal

	# print 'timing..'
	from time import clock
	hv = self.hv

	d = []
	h = [d]


	self.root.extend(100000*[h])
	self.root.extend(range(100000))

	start = clock()

	x = hv.heap()

	elapsed0 = start - clock()
	print 'elapsed0', elapsed0, 'len(x)', len(x)

	class Set(object):
	    __slots__ = 'some', '_hiding_tag_', 'other'
	    
	class Der(Set):
	    pass

	hv.register__hiding_tag__type(Set)

	s = Set()
	s._hiding_tag_ = hv._hiding_tag_
	d = Der()
	d._hiding_tag_ = hv._hiding_tag_
	self.root[0:50000]=25000*[s, d]

	start = clock()

	x = hv.heap()

	elapsed1 = clock() - start
	print 'elapsed1', elapsed1, 'len(x)', len(x)
	
        # This has failed a couple of times so I remove it now, (apr 5 2008)
        # xxx should look into this later ...
	#self.assert_(elapsed1 < 3.0 * elapsed0)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_heapyc.py/TestHeapView.test_timing/swapped operands of `-`