The Zope Bible phần 10

kết nối cơ sở dữ liệu con mồng" từ danh sách thả xuống sản phẩm. Điều này sẽ mang lại các kết nối cơ sở dữ liệu con mồng thêm hình thức, như thể hiện trong hình Thiết lập một không gian làm việc Tạo một kết nối con mồng mới | Chapter 19 Debugging 555 date and time that the processing began and the time in the seconds that it has been processing the page. The next column info contains all of the variables in the REQUEST object for that page. There is a lot of useful information in there such as what page is being requested PATH_INFO what page they came from HTTP_REFERER any form variables that may have been posted to the page the username of the requester and so on. This information is useful for duplicating a request to a page that may be hung or processing too slowly. Figure 19-4 The Zope Debugging Info screen Profiling The Profiling tab in the Control Panel provides some information gathered using the Python profiler. As you can see in Figure 19-5 it details a list of different functions plus some statistical data on the calling of each function. There are five different columns that provide statistical information. ncalls is the number of calls to that particular function. tottime is the total time spent executing that function not including time spent calling other functions. percall is tottime divided by ncalls. cumtime is the total time spent executing that function including time spent calling other functions. percall is cumtime divided by ncalls. What is this data useful for Primarily this data is intended to be used to single out the functions in your product that are running slowly and are affecting performance. Any bottlenecks in your system will show high tottime and percall and should be revised. 556 Part IV Advanced Zope Concepts Figure 19-5 The Zope Profiling screen Summary As we ve seen when it comes to debugging Zope has a wealth of options available to us. Whether our problems are simple such as typos or syntax errors or more complicated such as locked threads or memory leaks there is always an option for figuring out where things are going wrong. Simple problems can be debugged using the logging facilities more complicated problems require the use of the debugger. .

TỪ KHÓA LIÊN QUAN