Skip to content

Commit

Permalink
Merge pull request #97 from sanbeg/master
Browse files Browse the repository at this point in the history
fix to perl sampling code
  • Loading branch information
mrtazz committed Jun 26, 2012
2 parents bd82637 + 74131c8 commit 97888e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/Etsy/StatsD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ sub send {

my $sampled_data;
if ( defined($sample_rate) and $sample_rate < 1 ){
while (my($stat,$value) = each %$sampled_data) {
while (my($stat,$value) = each %$data) {
$sampled_data->{$stat} = "$value|\@$sample_rate" if rand() <= $sample_rate;
}
} else {
Expand All @@ -124,4 +124,4 @@ Steve Sanbeg L<http://www.buzzfeed.com/stv>
=cut

1;
1;

0 comments on commit 97888e6

Please sign in to comment.