Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65349

Profiling profilingincluded and profilingexcluded match anywhere in the url, not the full url

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.5, 3.6, 3.7
    • Fix Version/s: None
    • Component/s: Administration, Performance
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      Each of the entries in profilingincluded and profilingexcluded is treated as a search with wildcards BUT I have always assumed that it would behave like a regex with "^search$" but it doesn't, it finds a match anywhere.

      So for instance $CFG->profilingincluded = "summ"; will match '/admin/tool/dataprivacy/summary.php'. The field comments make it sound like you should have done

       

      "summ"

       

       if you wanted this. The first example of '/index.php' will match tons of pages, including /admin/index.php and /admin/tool/profiling/index.php, so there is no way to only profile the home page.

      It isn't unit tested either.

      https://github.com/moodle/moodle/blob/master/lib/xhprof/xhprof_moodle.php#L435-L449

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brendanheywood Brendan Heywood
                Reporter:
                brendanheywood Brendan Heywood
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: