[rhmessaging-commits] rhmessaging commits: r3695 - in mgmt/trunk: wooly/python/wooly and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Nov 4 12:00:24 EST 2009
Author: justi9
Date: 2009-11-04 12:00:24 -0500 (Wed, 04 Nov 2009)
New Revision: 3695
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/wooly/python/wooly/bench.py
mgmt/trunk/wooly/python/wooly/profile.py
Log:
Restore detection of process/render asymmetry
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-11-04 16:04:51 UTC (rev 3694)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-11-04 17:00:24 UTC (rev 3695)
@@ -46,6 +46,7 @@
def do_process(self, session, *args):
self.tasks.process(session)
self.heartbeat.process(session)
+ self.links.process(session)
super(CuminMainView, self).do_process(session, *args)
Modified: mgmt/trunk/wooly/python/wooly/bench.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/bench.py 2009-11-04 16:04:51 UTC (rev 3694)
+++ mgmt/trunk/wooly/python/wooly/bench.py 2009-11-04 17:00:24 UTC (rev 3695)
@@ -43,6 +43,7 @@
except KeyboardInterrupt:
raise
except:
+ print
print "Page failure"
profile.print_stack_trace()
@@ -106,6 +107,8 @@
print " %s" % html.replace("\n", "\n ")
print "-" * 80
+ profile.print_process_render_asymmetry()
+
#profile.compute_times()
#profile.print_results()
#profile.print_process_calls()
Modified: mgmt/trunk/wooly/python/wooly/profile.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/profile.py 2009-11-04 16:04:51 UTC (rev 3694)
+++ mgmt/trunk/wooly/python/wooly/profile.py 2009-11-04 17:00:24 UTC (rev 3695)
@@ -44,6 +44,22 @@
print row % (widget, min(times), max(times), avg, count, total)
+ def print_process_render_asymmetry(self):
+ processed = set()
+ rendered = set()
+
+ for call in self.process_calls:
+ processed.add(call.widget)
+
+ for call in self.render_calls:
+ rendered.add(call.widget)
+
+ for widget in processed.difference(rendered):
+ print "Warning: %s was processed but not rendered" % widget
+
+ for widget in rendered.difference(processed):
+ print "Warning: %s was rendered but not processed" % widget
+
def print_stack_trace(self):
for call in self.current_calls:
print "in %s" % call
@@ -157,7 +173,7 @@
if self.widget.parent:
cls = self.widget.__class__
name = self.widget.__repr__()
- fmt = "<!-- \nopen: %s\n -->%s<!-- \nclose: %s\n -->"
+ fmt = "<!-- \nopen: %s\n-->%s<!-- \nclose: %s\n-->"
result = fmt % (name, result, name)
More information about the rhmessaging-commits
mailing list