matlab的profiler使用说明 您所在的位置:网站首页 python调用matlab程序很慢 matlab的profiler使用说明

matlab的profiler使用说明

2023-06-03 03:21| 来源: 网络整理| 查看: 265

前言

为了弄清楚simulink程序里各个模块的单步的耗时,了解到可以使用profiler查看。

正文

使用以下语句,可以打开simulink profiler,再执行仿真后,就有各个模块的各个phase的执行时间的报告了。 set_param(‘mymodel’, ‘Profile’, ‘on’);

在这里插入图片描述 结果是大串英文,看不懂。在该文件里找到了help,翻译如下:

※summary legend

Total recorded time:总记录时间 Total time for simulating the model. 跑仿真模型的总时间。

Number of Block Methods:模块(包括如scope在内的各种)的数量: Total number of methods called by individual blocks in the model 模型中单个块调用的总数

Number of Internal Methods :内部方法的数量: Total number of internal Simulink methods called by the model. 模型调用的内部Simulink方法的总数。

Number of Model Methods:模型方法的数量 Number of methods called by the model. 模型调用的方法数。

Number of Nonvirtual Subsystem Methods:非虚拟子系统方法的数量: Number of methods called by any nonvirtual subsystems in the model 模型中任何非虚拟子系统调用的方法数

Clock precision:时钟精度 Precision of the profiler’s time measurement.

※Function List Legend

Time:时间 Time spent in this function, including all child functions called. 在此函数中花费的时间,包括调用的所有子函数。

Calls:调用 Number of times this function was called.调用此函数的次数。

Time/call: 每次调用花费的时间 Time spent per call.每次调用花费的时间

Self time:自我时间 Total time spent in this function, not including any calls to child functions.此函数花费的总时间,不包括对子函数的任何调用。

Location:位置 Link to the location of the block in your model. Use the link "Clear Highlighted Blocks"at the top of the page to unhilite all blocks. (Note: you must use the MATLAB Help browser to use these hyperlinks).链接到块在模型中的位置。使用页面顶部的链接“清除高亮显示的块”可以取消选中所有块。(注意:必须使用MATLAB帮助浏览器才能使用这些超链接)

Note: In accelerated mode, individual blocks will not show up in the profiler, unless they are executed internally in Simulink (e.g. a scope runs in Simulink instead of the generated code). Rerun in normal mode to get a more detailed analysis of the simulation. 注意:在加速模式下,除非在Simulink中内部执行,否则单个块不会显示在探查器中(例如,作用域在Simulink而不是生成的代码中运行)。在正常模式下重新运行,以获得更详细的模拟分析。

综合以上信息,“Time/call” 大概是我需要关注的。

※Model execution pseudocode 模型执行伪代码

在这里插入图片描述



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有