Add performance test coverage for the node/add page

Created on 24 September 2024, 3 months ago

Problem/Motivation

The node/add page is quite central to Drupal core, so we should add performance test coverage for it.

This can probably be added to the 'article' content type, although it should also have ckeditor5 enabled etc. to get a realistic picture, so might be easiest to use the standard install profile.

Drupal\Tests\standardi\FunctionalJavascript\NodeAddPerformanceTest::testPerformance()~

Other Umami and standard performance tests can be used as examples.

OpenTelemetryNodePagePerformanceTest
OpenTelemetryFrontPagePerformanceTest
StandardPerformanceTest

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

phpunit

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @catch
  • First commit to issue fork.
  • Pipeline finished with Failed
    3 months ago
    Total: 137s
    #292183
  • πŸ‡«πŸ‡·France goz

    I add cold and hot tests, but still have to deal with warm tests and maybe ckeditor5.

  • Pipeline finished with Failed
    3 months ago
    Total: 211s
    #292404
  • πŸ‡«πŸ‡·France goz

    We could add ckeditor5 and others but which one ?
    And does it make sense ?
    The purpose it to test performance of node/add page, not depending of field types right ?

  • πŸ‡«πŸ‡·France goz
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Pipeline appears to have test failures.

    Imagine there has to be a better way then super long queries? @catch?

  • πŸ‡«πŸ‡·France goz

    Queries are not deterministic anyway, so i remove them.

  • Pipeline finished with Failed
    3 months ago
    Total: 178s
    #292634
  • Pipeline finished with Success
    3 months ago
    Total: 617s
    #292649
  • πŸ‡¬πŸ‡§United Kingdom catch

    This looks pretty good except for one comment on the MR.

  • Pipeline finished with Failed
    3 months ago
    Total: 138s
    #293325
  • Pipeline finished with Success
    3 months ago
    Total: 518s
    #293403
  • Pipeline finished with Success
    3 months ago
    Total: 409s
    #294205
  • πŸ‡«πŸ‡·France goz

    I also add new rules on PerformanceTestTrait::logQuery() to fix queries matching issues.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    leaning on @catch review on these. Feedback appears to be addressed though

  • First commit to issue fork.
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Code looks good to me. It would be good to get a follow up to refactor core/tests/Drupal/Tests/PerformanceTestTrait.php to make use of some early returns.

    We can put this bit in a method

        // Inline query arguments and log the query.
        $query = str_replace(array_keys($args), array_values(static::quoteQueryArgs($args)), $query);
        $performance_data->logQuery($query);
    

    and turn a lot of the elseif into simple ifs with an early return

    Rebased off 11.x to make sure it still passes as 3 weeks is a long time in performance/query count time.

  • Pipeline finished with Failed
    2 months ago
    Total: 384s
    #318850
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Tests are failing in the rebase

Production build 0.71.5 2024