Unexpected output: Affected paths: relative - resubmit patch.
⚙ D469 INP-1861 - Cache results of the PHP_CodeSniffer & PHP_MessDetector
Page MenuHomeIn-Portal Phabricator

INP-1861 - Cache results of the PHP_CodeSniffer & PHP_MessDetector
ClosedPublic

Authored by alex on May 30 2024, 7:32 AM.

Details

Test Plan

The PHP Mess Detector (all modules)

In CLI:

  1. delete the build/cache/pmd_modules_result_cache.php and build/cache/pmd_core_result_cache.php files
  2. run the phing -f tools/build/build_all.xml phpmd-ci command
  3. remember previous command execution time (shown after Total time: ...)
  4. open any of above deleted cache files for editing
  5. confirm, that it contains relative paths to project files
  6. re-run the same command
  7. remember previous command execution time (shown after Total time: ...)
  8. confirm, that 2nd run of the command went much faster, then the 1st one

The PHP Mess Detector (custom module)

In CLI:

  1. delete the pmd_custom_result_cache.php file
  2. run the phing -f tools/build/build_custom.xml phpmd-ci command
  3. remember previous command execution time (shown after Total time: ...)
  4. open above deleted cache file for editing
  5. confirm, that it contains relative paths to project files
  6. re-run the same command
  7. remember previous command execution time (shown after Total time: ...)
  8. confirm, that 2nd run of the command went faster, then the 1st one

The PHP Code Sniffer (all modules)

In CLI:

  1. run the phing -f tools/build/build_all.xml phpcs-ci command
  2. remember previous command execution time (shown after Time: ...)
  3. re-run the same command
  4. remember previous command execution time (shown after Time: ...)
  5. confirm, that 2nd run of the command went much faster, then the 1st one

The PHP Code Sniffer (custom module)

In CLI:

  1. run the phing -f tools/build/build_custom.xml phpcs-ci command
  2. remember previous command execution time (shown after Time: ...)
  3. re-run the same command
  4. remember previous command execution time (shown after Time: ...)
  5. confirm, that 2nd run of the command went faster, then the 1st one

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1247
Build 1247: arc lint + arc unit

Event Timeline

alex created this revision.May 30 2024, 7:32 AM
alex requested review of this revision.May 30 2024, 7:32 AM
alex added a project: Restricted Project.May 30 2024, 7:32 AM
erik requested changes to this revision.May 30 2024, 11:33 AM

Time reports for all 8 tests

Total time: 9 minutes 51.26 seconds
Total time: 6 minutes 19.33 seconds

Total time: 1.8955 second
Total time: 2.0889 seconds

Total time: 3 minutes 32.83 seconds
Total time: 14.3168 seconds

Total time: 1.9503 second
Total time: 2.0391 seconds

So 1st and 3rd command are ok.
But 2nd and 4rd commands on second run were slower than on 1st run.

This revision now requires changes to proceed.May 30 2024, 11:33 AM
erik accepted this revision.May 31 2024, 5:34 AM
This revision is now accepted and ready to land.May 31 2024, 5:34 AM
alex updated this revision to Diff 1204.May 31 2024, 5:38 AM

Bugfix: the PHP_MessDetector was building it's cache with absolute paths instead of a relative ones.

alex updated this revision to Diff 1205.May 31 2024, 5:47 AM

Removed debug code.

alex edited the test plan for this revision. (Show Details)May 31 2024, 6:02 AM
alex updated this revision to Diff 1206.May 31 2024, 6:57 AM

Indicate PHP_CodeSniffer & PHP_MessDetector versions, that support caching.

erik accepted this revision.May 31 2024, 7:13 AM

all right, test times:

Total time: 7 minutes 34.23 seconds
Total time: 2.1493 seconds

Total time: 1.7272 second
Total time: 0.8593 seconds

Total time: 6 minutes 49.16 seconds
Total time: 27.9625 seconds

Total time: 3.5159 seconds
Total time: 3.1935 seconds

This revision was automatically updated to reflect the committed changes.