diff --git a/src/TraceParser.php b/src/TraceParser.php index 1716852..ed42f98 100644 --- a/src/TraceParser.php +++ b/src/TraceParser.php @@ -47,8 +47,8 @@ public function parse() { // Get start/end messages $count = count($fields); if ($count == 2) { - $timestamp = $fields[2]; - if (strpos('TRACE END') === 0) { + $timestamp = $fields[1]; + if (strpos('TRACE END', $fields[0]) === 0) { foreach ($this->observers as $o) $o->endEntry($timestamp); } else { diff --git a/src/trace4func b/src/trace4func index 882085c..00390d8 100755 --- a/src/trace4func +++ b/src/trace4func @@ -26,6 +26,7 @@ if (empty($report)) { die("No symbols found"); } +$counter = 0; foreach ($report as $trace) { ++$counter; print $counter . ".\t";// . "\t" . array_shift($trace) . PHP_EOL . "\t";