当前位置: 首页>>代码示例>>PHP>>正文


PHP KernelInterface::getStartTime方法代码示例

本文整理汇总了PHP中Symfony\Component\HttpKernel\KernelInterface::getStartTime方法的典型用法代码示例。如果您正苦于以下问题:PHP KernelInterface::getStartTime方法的具体用法?PHP KernelInterface::getStartTime怎么用?PHP KernelInterface::getStartTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\HttpKernel\KernelInterface的用法示例。


在下文中一共展示了KernelInterface::getStartTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: collect

 /**
  * {@inheritdoc}
  */
 public function collect(Request $request, Response $response, \Exception $exception = null)
 {
     $queryCount = 0;
     $queryTime = 0;
     $dataSources = array();
     foreach ($this->dataProfilerManager as $profiler) {
         $queryCount += $profiler->count();
         $queryTime += $profiler->getTotalElapsedSecs();
         $name = $profiler->getDataSourceName();
         $dataSources[$name] = array("queryTime" => $profiler->getTotalElapsedSecs(), "queryCount" => $profiler->count(), "profiles" => array());
         foreach ($profiler as $profile) {
             $dataSources[$name]["profiles"][] = array("queryTime" => $profile->hasEnded() ? $profile->getElapsedSecs() : false, "queryText" => $profiler->getFormatter()->formatHtml($profile->getQueryText()), "params" => $this->formatQueryParams($profile->getQueryParams()), "startTime" => $profile->getStartMicrotime() - $this->kernel->getStartTime(), "endTime" => $profile->hasEnded() ? $profile->getEndMicrotime() - $this->kernel->getStartTime() : false, "startMemoryUsage" => $profile->getStartMemoryUsage(true), "endMemoryUsage" => $profile->hasEnded() ? $profile->getEndMemoryUsage(true) : false, "startPeakMemoryUsage" => $profile->getStartPeakMemoryUsage(true), "endPeakMemoryUsage" => $profile->hasEnded() ? $profile->getEndPeakMemoryUsage(true) : false);
         }
     }
     $this->data["queryCount"] = $queryCount;
     $this->data["queryTime"] = $queryTime;
     $this->data["dataSources"] = $dataSources;
 }
开发者ID:samleybrize,项目名称:bugzorcist,代码行数:21,代码来源:BugzorcistDataCollector.php

示例2: getStartTime

 /**
  * {@inheritdoc}
  */
 public function getStartTime()
 {
     return $this->kernel->getStartTime();
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:KernelProxy.php

示例3: __construct

 /**
  * @param LoggerInterface $logger
  * @param QueryExecution  $queryExecution
  * @param KernelInterface $kernel
  */
 public function __construct(LoggerInterface $logger, QueryExecution $queryExecution, KernelInterface $kernel)
 {
     $this->logger = $logger;
     $this->queryExecution = $queryExecution;
     $this->startTime = $kernel->getStartTime();
 }
开发者ID:supportyard,项目名称:monitoring-bundle,代码行数:11,代码来源:LogResourceListener.php


注:本文中的Symfony\Component\HttpKernel\KernelInterface::getStartTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。