tailieunhanh - O’Reilly Mastering Perl 2007 phần 4

Trước khi tôi quyết định làm thế nào để cải thiện chương trình Perl của tôi, tôi cần vào hồ sơ để xác định phần công việc nhất. Perl profilers gỡ rối chỉ chuyên ngành, và nếu tôi không thích những gì đến đã ra khỏi đó, tôi có thể làm cho profiler của riêng trên đó dòng mã, và màu đỏ để nói với tôi rằng tôi có làm việc thử nghiệm nhiều hơn | 0 o o File Coverage blib lib HTTP CD kJ file localhosl o G Listen Write Read Perl Gmail TPR Submissions brian Publishing Disable Jf C5ST Forms Images i Information - Miscellaneous L Outllne Resize À File Coverage 0 I File blib lib HTTP I Coverage line stmt branch cond sub I pod II time 1 Id V 2006 06 0 2 package HTTP Ĩ size 3 CO CO CO 3 62 13 70 use strict 4 Done Disabled Figure 5-2. The coverage report for a particular file shows me how well I tested that line of code urement on that line of code and red to tell me that I have more testing work to do Figure 5-2 . Su rĩìrĩìđ ry Before I decide how to improve my Perl program I need to profile it to determine which sections n d the most work. Perl profilers just debuggers and if I don t like what salreadyout there I can make my own profiler. FurtherRead inq The perldebguts documentation describes creating a custom debugger. I write more about those in my articles for The Perl Journal Creating a Perl Debugger http andProii ing in Perl http 18440458Cf . The Perl ProlPlt-TitCbapttT 20 oi Programming Perl Third Edition by Larry Wall Tom ChriTtianse n nnd Jo n Opwant. Anyone on the roar 1 0 Perl roEsirry should already have this book. 88 I Chapter 5 Profillnginrl has two interesting articles on profiling Profiling Perl by Simon Cozens http lpt a 850 and Debugging and Profiling mod_perl Applications by Frank Wiles http pub a 2006 02 09 . Randal L. Schwartz writes abour profiling in Speeding up Your Phrl Programs for Unix Review http meriyn UmxRrpieu and Ỹroíiee ing in Templet Toolkie pip Overriding for Linux Magaziee e . om mer . Further Reading I 89 CHAPTER 6 Benchmarking Perl Tony Hoare s famous quote Premature optimization is the root of all evil usually doesn t come with its setup We should forget about small .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.