# HG changeset patch # User Adrien Di Mascio # Date 1244643209 -7200 # Node ID f5102472243def5a27e259214273f22a419ebcb8 # Parent a7ea618e5478ad0cdebc8b94d95c9bf08719eb7c [exlog] print clocktime in addition to cputime diff -r a7ea618e5478 -r f5102472243d devtools/devctl.py --- a/devtools/devctl.py Wed Jun 10 14:51:48 2009 +0200 +++ b/devtools/devctl.py Wed Jun 10 16:13:29 2009 +0200 @@ -572,22 +572,25 @@ req = requests.setdefault(rql, []) time.strip() chunks = time.split() + clocktime = float(chunks[0][1:]) cputime = float(chunks[-3]) - req.append( cputime ) + req.append( (clocktime, cputime) ) except Exception, exc: sys.stderr.write('Line %s: %s (%s)\n' % (lineno, exc, line)) stat = [] for rql, times in requests.items(): - stat.append( (sum(times), len(times), rql) ) + stat.append( (sum(time[0] for time in times), + sum(time[1] for time in times), + len(times), rql) ) stat.sort() stat.reverse() - total_time = sum(time for time, occ, rql in stat)*0.01 - print 'Percentage;Cumulative Time;Occurences;Query' - for time, occ, rql in stat: - print '%.2f;%.2f;%s;%s' % (time/total_time, time, occ, rql) + total_time = sum(clocktime for clocktime, cputime, occ, rql in stat)*0.01 + print 'Percentage;Cumulative Time (clock);Cumulative Time (CPU);Occurences;Query' + for clocktime, cputime, occ, rql in stat: + print '%.2f;%.2f;%.2f;%s;%s' % (clocktime/total_time, clocktime, cputime, occ, rql) register_commands((UpdateCubicWebCatalogCommand, UpdateTemplateCatalogCommand,