文章
· 一月 7, 2023 阅读大约需 4 分钟

第三十七章 使用 ^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. 选择要分析其代码的例程后,该例程将显示一页有关该代码的信息。
讨论 (0)1
登录或注册以继续