Skip to content
Snippets Groups Projects
Commit a4f26a7b authored by catch's avatar catch
Browse files

Issue #3477191 by goz, pavel.bulat, benjifisher, catch: Add...

Issue #3477191 by goz, pavel.bulat, benjifisher, catch: Add PerformanceTestTrait::assertMetrics() so it is easier to write performance tests
parent a8ab8712
No related branches found
No related tags found
5 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation
Pipeline #393318 passed with warnings
Pipeline: drupal

#393343

    Pipeline: drupal

    #393337

      Pipeline: drupal

      #393336

        +4
        ......@@ -640,7 +640,7 @@ protected function assertMetrics(
        array $expected,
        PerformanceData $performance_data,
        ): void {
        // Allow those metrics to have a range of +/- 50 bytes, so small changes
        // Allow those metrics to have a range of +/- 500 bytes, so small changes
        // are not significant enough to break tests.
        $assertRange = [
        'ScriptBytes',
        ......@@ -648,7 +648,7 @@ protected function assertMetrics(
        ];
        foreach ($expected as $name => $metric) {
        if (in_array($name, $assertRange)) {
        $this->assertCountBetween($metric - 50, $metric + 50, $performance_data->{"get$name"}(), "Asserting $name");
        $this->assertCountBetween($metric - 500, $metric + 500, $performance_data->{"get$name"}(), "Asserting $name");
        }
        else {
        $this->assertSame($metric, $performance_data->{"get$name"}(), "Asserting $name");
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment