第三十七章 使用 ^PROFILE 監控例程性能 - ^PROFILE 示例 第三十七章 使用 ^PROFILE 監控例程性能 - Using ^PROFILE ^PROFILE 示例

第三十七章 使用 ^PROFILE 監控例程性能 - Using ^PROFILE

  • 當顯示子例程標籤列表(以及每個標籤的指標)時,可以指定以下任何一項
Option Description
# 要更詳細地分析的子例程標籤(在代碼中)的行號。按 Enter 後,將顯示指定標籤的代碼。
B 顯示列表的上一頁。
L 切換到子程序的行級顯示。
N 顯示列表的下一頁。
Q 退出列表,返回上一級。
R 使用最新指標刷新列表。注:如果列表中顯示*UNKNOWN*,請輸入R

當顯示代碼行時,系統會提示指定下一步要執行的操作。的選擇包括:

Option Description
# 要更詳細地分析的代碼中的行號。按Enter鍵後,將顯示指定標籤的代碼。
B 顯示列表的上一頁。
C 在源代碼和中間(INT/MVI)代碼之間切換代碼顯示。
M 更改頁邊距和長度。
N 顯示列表的下一頁。
O 根據不同的指標對頁面進行重新排序。
Q 退出列表,返回到上一級別。
R 使用最新指標刷新列表。
S 切換到例程的子例程級別顯示。

^PROFILE 示例

以下是在終端中以交互方式運行^配置文件實用程序(從%sys命名空間)的示例:

  1. 輸入以下命令:
do ^PROFILE
  1. 此時將顯示以下消息。
WARNING: This routine will start a system-wide collection of
data on routine activity and then display the results. There
may be some overhead associated with the initial collection,
and it could significantly affect a busy system.
 
The second phase of collecting line level detail activity
has high overhead and should ONLY BE RUN ON A TEST SYSTEM!
 
Are you ready to start the collection?  Yes =>
  1. Enter鍵開始收集指標。將顯示與以下內容類似的指標:
 Waiting for initial data collection ...
 
      RtnLine     Time        CPU         RtnLoad     GloRef      GloSet
1.    41.48%      12.19%      0.00%       28.97%      10.65%      0.00%
      %Library.ResultSet.1.INT (IRISLIB)
2.    35.09%      56.16%      65.22%      9.35%       36.77%      42.55%
      SYS.Database.1.INT (IRISSYS)
3.    10.75%      6.62%       0.00%       43.30%      22.68%      46.81%
      Config.Databases.1.INT (IRISSYS)
4.    7.13%       3.22%       0.00%       6.23%       0.00%       0.00%
      %Library.Persistent.1.INT (IRISLIB)
5.    1.26%       0.71%       0.00%       4.36%       4.12%       4.26%
      PROFILE.INT (IRISSYS)
6.    1.20%       0.00%       0.00%       0.00%       5.15%       6.38%
      %SYS.WorkQueueMgr.INT (IRISSYS)
7.    0.76%       15.08%      34.78%      0.00%       0.00%       0.00%
      %SYS.API.INT (IRISSYS)
8.    0.64%       1.05%       0.00%       0.00%       17.18%      0.00%
      %Library.JournalState.1.INT (IRISLIB)
9.    0.61%       0.31%       0.00%       3.74%       0.00%       0.00%
      %Library.IResultSet.1.INT (IRISLIB)
10.   0.28%       0.93%       0.00%       0.00%       1.72%       0.00%
      %Library.Device.1.INT (IRISLIB)
11.   0.24%       0.71%       0.00%       0.62%       0.00%       0.00%
      Config.CPF.1.INT (IRISSYS)
Select routine(s) or '?' for more options  N =>
  1. 輸入與要更詳細分析的例程相關聯的數字。例如,輸入2-35710,然後輸入N或B以顯示其他頁面,以可以選擇其他程序。
  2. 選擇要分析的所有例程後,輸入q以顯示類似以下內容的消息:
There are 2 routines selected for detailed profiling. You may now
end the routine level collection and start a detailed profiler collection.
 
WARNING !!
 
This will have each process on the system gather subroutine level and line
level activity on these routines. Note that this part of the collection may
have a significant effect on performance and should only be run in a test
or development instance.
 
Are you ready to start the detailed collection?  Yes =>
  1. Enter鍵後,將顯示類似以下內容的頁面:
Stopping the routine level Profile collection ...
 
Loading ^%Library.Persistent.1 in ^^c:\intersystems\iris\mgr\irislib\
 
Detail level Profile collection started.
 
 
 
 
 
    RtnLine     Routine Name  (Database)
1.  96.72%      %Library.Persistent.1.INT (IRISLIB)
2.  3.28%       Config.CPF.1.INT (IRISSYS)
Select routine to see details or '?' for more options  R =>
  1. 選擇要分析其代碼的例程後,該例程將顯示一頁有關該代碼的信息。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章