Opened 10 years ago

Closed 10 years ago

#3272 enhancement closed duplicate (duplicate)

sorting the --profile output in trial

Reported by: David Petar Novakovic Owned by:
Priority: low Milestone:
Component: trial Keywords: profile, trial, sort
Cc: therve Branch: 2.5
branch-diff, diff-cov, branch-cov, buildbot
Author:

Description

There are some minimal changes that could be made to the --profile option in trial that would allow the profile results to be meaningfully displayed.

the most useful one for me is to change line 186 in t.trial.util (twisted 2.5) to: prof.print_stats(sort="time")

This sorts on the total time spent in each callable.

The function is "profiled" in the module's global space.

Change History (5)

comment:1 Changed 10 years ago by David Petar Novakovic

I just noticed the code for 2.4 which uses hotshot, actually does the sort based on cum time. so this change actually makes the behaviour more consistent.

cheers

comment:2 Changed 10 years ago by therve

Cc: therve added

I'm tempted to close it as a duplicate of #3042. Once you have the full object dumped, you can sort by whatever you want.

comment:3 Changed 10 years ago by David Petar Novakovic

I'm happy with that.

comment:4 Changed 10 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

Great.

comment:5 Changed 7 years ago by <automation>

Owner: Jonathan Lange deleted
Note: See TracTickets for help on using tickets.