zoukankan      html  css  js  c++  java
  • [转]Magento2命令行配置之性能测试生成数据

    本文转自:https://blog.csdn.net/xz_src/article/details/72799539

    性能测试数据概述

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

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

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

    第一步

    1. 登录到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 ...
    
    版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xz_src/article/details/72799539
  • 相关阅读:
    Spring-IOC容器
    VUE 过滤器
    axios.post参数问题
    Stylus| vue项目中stylus和stylus-loader版本兼容问题
    SPA
    Options API 和 Composition API 的对比
    【ES6学习笔记之】Object.assign()
    vue element-ui 常用组件
    Vue调试工具
    组件
  • 原文地址:https://www.cnblogs.com/freeliver54/p/9122615.html
Copyright © 2011-2022 走看看