Đang chuẩn bị liên kết để tải về tài liệu:
O’Reilly Mastering Perl 2007 phần 4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

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 tôi.urement 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 Size.pm 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 Size.pm I Coverage 88.4 line stmt branch cond sub I pod II time 1 Id Size.pm V 1.11 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 sprc.al.zed 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 www.ddj.comu1882U4522 andProii ing in Perl http www.ddj.com 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 Perl.com has two interesting articles on profiling Profiling Perl by Simon Cozens http www.perl.eom lpt a 850 and Debugging and Profiling mod_perl Applications by Frank Wiles http www.perl.eom pub a 2006 02 09 debug_mod_perl.html . Randal L. Schwartz writes abour profiling in Speeding up Your Phrl Programs for Unix Review http www.stonehenge.com meriyn UmxRrpieu crla9.hrml and Ỹroíiee ing in Templet Toolkie pip Overriding for Linux Magaziee tWi.tS.h e www.stoneeenre. om mer ynlUnuxMaglcott5.hthd . 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ÀI LIỆU 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.