/** * @param PostResponseEvent $event */ public function onTerminate(PostResponseEvent $event) { $response = $event->getResponse(); if (!is_null($this->logger)) { $this->logger->info('< ' . $response->getStatusCode()); if (!is_null($this->benchmark)) { $total = $this->benchmark->getAppStatistic(); $this->logger->info('= Time: ' . $total['time'] . ', Memory: ' . FileSizeHelper::humanize($total['memory'])); } } }
public function testUnhumanize() { self::assertEquals(FileSizeHelper::unhumanize('1KB'), 1024); self::assertEquals(FileSizeHelper::unhumanize('953.67MB'), 999995474); self::assertEquals(FileSizeHelper::unhumanize('954MB'), 1000341504); }