/**
  * {@inheritdoc}
  */
 public function parse($data, CodecInterface $codec = null)
 {
     if (isset($data['metrics'])) {
         $this->setMetrics($data['metrics']);
     }
     parent::parse($data, $codec);
 }
 /**
  * @param array $data
  */
 public function __construct($data = null)
 {
     $this->time = time();
     parent::__construct();
 }