Skip to content

Commit

Permalink
Support floating point numbers in instruments CSV
Browse files Browse the repository at this point in the history
When I generate Instruments data with the sample interval set to 40
microseconds instead of 1 ms and then export the data, I get Self values
that are sometimes floating point fractional numbers of ms.

Modify the regex to account for the potential of these numbers.
  • Loading branch information
carols10cents committed Dec 6, 2015
1 parent 182b24f commit 2c3056b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stackcollapse-instruments.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<>;
foreach (<>) {
chomp;
/\d+\.\d+ms[^,]+,(\d+),\s+,(\s*)(.+)/ or die;
/\d+\.\d+ms[^,]+,(\d+(?:\.\d*)?),\s+,(\s*)(.+)/ or die;
my $func = $3;
my $depth = length ($2);
$stack [$depth] = $3;
Expand Down

0 comments on commit 2c3056b

Please sign in to comment.