示例#1
0
 /**
  * Calculate the time cut-off for a trivial step
  *
  * Utilizes the {@link profiler::$trivialThreshold} value to determine how fast a step must be to be regarded "trivial"
  *
  * @uses profiler::$trivialThresdhold
  * @see profiler::$trivialThresholdMS
  */
 protected static function calculateThreshold()
 {
     if (count(self::$childDurations)) {
         foreach (self::$childDurations as &$childDuration) {
             $childDuration = round($childDuration * 1000, 1);
         }
         sort(self::$childDurations);
         self::$trivialThresholdMS = self::$childDurations[floor(count(self::$childDurations) * self::$trivialThreshold)];
     }
 }