Magento教程

Magento 分析

名为 Profiler 的功能在 Magento 开发中起着重要作用,可用于调试。它指定了使页面加载变慢的代码块。 Magento 分析器报告代码块执行所用的时间、代码块执行的次数以及它在呈现 Magento 网页时使用的内存。
要启用 Profiler,请按照以下步骤操作-
步骤 1-登录您的 Magento 管理面板。
步骤 2-转到 系统 菜单并单击 配置 选项。
Magento Profiling
步骤 3-在导航栏的左侧,转到 Advanced 部分,然后单击 Developer 选项。
Magento Profiling
第 4 步-展开 调试 面板并通过将其设置为是来启用分析器,然后单击 保存配置 按钮。
Magento Profiling
步骤 5-此时分析器已启用,但您需要告诉分析器使用什么配置文件。因此,转到 Magento 安装的根 index.php 文件并查找行 #Varien_Profiler::enable(); 并取消注释它,即删除井号。
步骤 6-现在转到您的任何页面,您应该会在页面的页脚区域看到输出,如下面的屏幕所示。
Magento Profiling
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4