public function load($data)
{
if (!isset($data['start']) || empty($data['start'])) {
throw new \RuntimeException('Unable to determine request start time');
}
$this->_start = $data['start'] * 1000;
if (!isset($data['end']) || empty($data['end'])) {
throw new \RuntimeException('Unable to determine request end time');
}
$this->_end = $data['end'] * 1000;
if (isset($this->module->panels['profiling']->data['time'])) {
$this->_duration = $this->module->panels['profiling']->data['time'] * 1000;
} else {
$this->_duration = $this->_end - $this->_start;
}
if ($this->_duration <= 0) {
throw new \RuntimeException('Duration cannot be zero');
}
}