Permalink
Browse files

fix data sampling

  • Loading branch information...
1 parent 11049a2 commit 74131c884b7f943662d97abcb5c829eebbc44f9b Steve Sanbeg committed May 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/Etsy/StatsD.pm
View
@@ -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 {
@@ -124,4 +124,4 @@ Steve Sanbeg L<http://www.buzzfeed.com/stv>
=cut
-1;
+1;

0 comments on commit 74131c8

Please sign in to comment.