Commit f4be5a7
committed
Make the pstats browser recognise SampledStats
The SampledStats results are stored in the exact same format as Stats,
but since the results don't represent call counts but sample counts, the
column headers are different to account for this.
This ensure that using the pstats browser instantiates the right object
to handle the correct columns, add a factory function which can
instantiate the correct class. As the Stats class can only handle either
a filename or an object which provides the 'stats' attribute in a
pre-parsed format, this provides a StatsLoaderShim to avoid marshalling
the data twice (once to check the marker and once in the Stats module if
we were to pass the file name).1 parent 38ab68c commit f4be5a7
2 files changed
+35
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
642 | 664 | | |
643 | 665 | | |
644 | 666 | | |
| |||
725 | 747 | | |
726 | 748 | | |
727 | 749 | | |
728 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
729 | 759 | | |
730 | 760 | | |
731 | 761 | | |
| |||
0 commit comments