Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16545

Improve totaltime calculation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Component/s: Other
    • Labels:

      Description

      In phpbb, we are calculating the total processing time of a page, but there are currently two issues, or rather code that can be improved:

      • $starttime is currently set in startup.php, and used as global in other methods.
        This appears unneeded: where we need the starttime, we could as well use a variable set by PHP:

        request->server('REQUEST_TIME_FLOAT', 0.0)

      • For starttime, some code uses the string return version of microtime(), to then split the result and sum both parts. This should be replaced with microtime(true). Example from driver.php

      $mtime = explode(' ', microtime())
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Tomba Steven De Groote
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: