您的位置:首页 > 其它

Magento2命令行配置之性能测试生成数据

2017-05-29 07:29 417 查看

性能测试数据概述

使用Magento性能工具包或其他工具进行性能测试,你必定产生大量的数据(例如,存储,分类,产品,等等)。

您可以调整您创建的数据量,使用profiles(配置)(小,中,大,特大)。下一节将详细讨论配置文件。

下图显示了如何使用小配置文件在店面上显示产品:



第一步

登录到Magento服务器切换到Magento 2文件系统的所有者用户要有写入的权限.

如果你使用bash shell,你也可以使用下面的语法转换到Magento文件系统所有者:

su <Magento 2文件系统所有者> -s /bin/bash -c <command>
sudo -u <Magento 2文件系统所有者>  <command>


您也可以按下列方式运行命令:

cd <Magento 2 安装目录>/bin
并运行它们
./magento <command name>

php <Magento 2 安装目录>/bin/magento <command name>


关于配置文件(profiles)

下表提供了数据生成器配置文件的详细信息(小,中,大,特大)。

配置文件位于
<Magento 2 安装目录>/setup/performance-toolkit/profiles/<ce 或 ee>


例如,
/var/www/html/magento2/setup/performance-toolkit/profiles/ce


参数Small profileMedium profileLarge profileExtra large profile
websites

1

1

3

5

store_groups

1

2

3

5

store_views

1

2

3

5

simple_products

800

16,000

400,000

800,000

configurable_products

50

1,000

25,000

50,000

categories

30

300

1,000

3,000

categories_nesting_level

3

3

3

6

catalog_price_rules

10

20

50

100

catalog_target_rules

2

5

10

50

cart_price_rules

10

20

50

100

cart_price_rules_floor

2

2

2

5

customers

20

200

2,000

5,000

tax rates

40,000

40,000

40,000

40,000

orders

80

1,600

40,000

80,000

运行数据生成器

按本节讨论的命令运行。命令运行后,重建索引.

命令选项:

magento setup:perf:generate-fixtures {配置文件绝对路径路径和名称}

例如,

magento setup:perf:generate-fixtures /var/www/html/magento2/setup/performance-toolkit/profiles/ce/small.xml

小样本输出:

生成的文件和参数:
|- Websites: 1
|- Store Groups: 1
|- Store Views: 1
|- Categories: 30
|- Simple products: 800
|- Configurable products: 50
|- Customers: 20
|- Cart Price Rules: 10
|- Catalog Price Rules: 10
|- Orders: 80
Generating websites, stores and store views...  done in <time>
Generating categories...  done in <time>
Generating simple products...  done in <time>
Generating configurable EAV variations...  done in <time>
... more ...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息