Jean Brouwers <mrje...@gmail.com> added the comment: Attached is *an* attempt to combine the old profile/cProfile modules into a single one called profile. Only the C and Python source and test files are included, not any documentation files. More details are in the README file, copied below.
Hopefully, this is useful. /Jean Brouwers These are the modified files to replace the old profile module with the fast cProfile one and rename the latter. A complete list and description follow. ./README ./profileNEW/setup.py ./profileNEW/Lib/profile.py ./profileNEW/Lib/test/profilee.py ./profileNEW/Lib/test/test_profile.py ./profileNEW/Modules/_profile.c ./profilePy3k/setup.py ./profilePy3k/Lib/profile.py ./profilePy3k/Lib/test/profilee.py ./profilePy3k/Lib/test/test_cprofile.py ./profilePy3k/Lib/test/test_profile.py ./profilePy3k/Modules/_lsprof.c ./diff_-u_profilePy3k_Modules_lsprof.c_profileNEW_Modules_profile.c.txt ./diff_-ur_profilePy3k_profileNEW.txt ./_profile_hires.c Directory profileNEW contains all the source and test files in their corresponding directories. Directory profilePy3k contains the old, original files from the py3k trunk taken on May 31, 2009. Basically, the old _lsprof.c file has been modified and renamed to _profile.c. Both old test_profile.py and test_cprofile.py files have been combined into a single new file test_profile.py. The file diff_-ur_profilePy3k_profileNEW.txt contains the forward diffences between all the new and orginal files. File diff_-u_profilePy3k_Modules_lsprof.c_profileNEW_Modules_profile.c.txt contains just the differences between the old _lsprof.c and new _profile.c files. Lastly, for your consideration, file _profile_hires.c is the new _profile.c file enhanced to use a high resolution timer, see <http://bugs.python.org/issue2281>. This file would replace the _profile.c file in the profileNEW/Modules directory. The new files and tests were installed in a Python 3.0.1 build and compiled and tested on MacOS X 10.4.11 Tiger (Intel). The patches from issue 5330 were also installed in this build, see <http://bugs.python.org/issue5330>. All tests passed after regenerating the expected results % python.exe Lib/test/test_profile.py -r Regenerating Lib/test/test_profile.py... % python.exe Lib/test/test_profile.py test_bad_counter_during_dealloc (__main__.ProfileTest) ... ok test_calling_conventions (__main__.ProfileTest) ... ok test_profile (__main__.ProfileTest) ... ok ---------------------------------------------------------------------- Ran 3 tests in 0.017s OK ---------- nosy: +MrJean1 Added file: http://bugs.python.org/file14131/profile_module.tgz _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2919> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com