Standard Configuration

The standard configuration of a Magento Cloud project already includes a sample  .blackfire.yaml  file at the root of your code directory.

Please first check if this file exists.

  • If it does, you can skip the following and proceed to step 7 of the configuration guide
  • If it does not, please follow the procedure below.

Writing your first tests

  1. Create a new Git branch on your Magento Cloud integration platform
  2. Add a .blackfire.yaml  file at the root of your code directory
  3. Write tests, scenarios and metrics (if needed) in that file.
  4. Commit and push in order to trigger Magento Cloud to deploy an integration environment. You should already see your tests executed on that environment
  5. Merge the branch to master so that your tests can be applied to any new branch, and deployed in production

If you're wondering which tests to write, here's an example below:

    Pages should be fast enough:
        path: /.*
            - main.wall_time < 400ms
            - < 150ms
            - main.cpu_time < 300ms
    Pages should not consume too much memory:
        path: /.*
            - main.memory < 50M
            - main.peak_memory < 75M
    Pages should not do too many SQL queries:
        path: /.*
            - metrics.sql.queries.count <= 12
    Pages should be light:
        path: /.*
            - metrics.output.network_out < 100KB
    Pages should not become slower:
        path: /.*
            - percent(main.wall_time) < 40%
            - diff(metrics.sql.queries.count) < 2
        - /
    Product list:
        - /women/tops-women/jackets-women.html
        - /checkout
        - /checkout/payment
Did this answer your question?