芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/minscoop.com/system/ThirdParty/Kint/Renderer/Text/MicrotimePlugin.php
renderer instanceof PlainRenderer) { $this->useJs = true; } } public function render(Value $o): ?string { $r = $o->getRepresentation('microtime'); if (!$r instanceof MicrotimeRepresentation || !($dt = $r->getDateTime())) { return null; } $out = ''; if (0 == $o->depth) { $out .= $this->renderer->colorTitle($this->renderer->renderTitle($o)).PHP_EOL; } $out .= $this->renderer->renderHeader($o); $out .= $this->renderer->renderChildren($o).PHP_EOL; $indent = \str_repeat(' ', ($o->depth + 1) * $this->renderer->indent_width); if ($this->useJs) { $out .= '
'; } $out .= $indent.$this->renderer->colorType('TIME:').' '; $out .= $this->renderer->colorValue($dt->format('Y-m-d H:i:s.u')).PHP_EOL; if (null !== $r->lap) { $out .= $indent.$this->renderer->colorType('SINCE LAST CALL:').' '; $lap = \round($r->lap, 4); if ($this->useJs) { $lap = '
'.$lap.'
'; } $out .= $this->renderer->colorValue($lap.'s').'.'.PHP_EOL; } if (null !== $r->total) { $out .= $indent.$this->renderer->colorType('SINCE START:').' '; $out .= $this->renderer->colorValue(\round($r->total, 4).'s').'.'.PHP_EOL; } if (null !== $r->avg) { $out .= $indent.$this->renderer->colorType('AVERAGE DURATION:').' '; $avg = \round($r->avg, 4); if ($this->useJs) { $avg = '
'.$avg.'
'; } $out .= $this->renderer->colorValue($avg.'s').'.'.PHP_EOL; } $bytes = Utils::getHumanReadableBytes($r->mem); $mem = $r->mem.' bytes ('.\round($bytes['value'], 3).' '.$bytes['unit'].')'; $bytes = Utils::getHumanReadableBytes($r->mem_real); $mem .= ' (real '.\round($bytes['value'], 3).' '.$bytes['unit'].')'; $out .= $indent.$this->renderer->colorType('MEMORY USAGE:').' '; $out .= $this->renderer->colorValue($mem).'.'.PHP_EOL; $bytes = Utils::getHumanReadableBytes($r->mem_peak); $mem = $r->mem_peak.' bytes ('.\round($bytes['value'], 3).' '.$bytes['unit'].')'; $bytes = Utils::getHumanReadableBytes($r->mem_peak_real); $mem .= ' (real '.\round($bytes['value'], 3).' '.$bytes['unit'].')'; $out .= $indent.$this->renderer->colorType('PEAK MEMORY USAGE:').' '; $out .= $this->renderer->colorValue($mem).'.'.PHP_EOL; if ($this->useJs) { $out .= '
'; } return $out; } public static function renderJs(): string { return RichPlugin::renderJs(); } }