Skip to content

Commit

Permalink
Fix sampler for low Burst values (rs#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
millerlogic authored and rs committed Nov 27, 2017
1 parent c8e50a6 commit 1251b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type BurstSampler struct {

// Sample implements the Sampler interface.
func (s *BurstSampler) Sample(lvl Level) bool {
if s.Burst > 9 && s.Period > 0 {
if s.Burst > 0 && s.Period > 0 {
if s.inc() <= s.Burst {
return true
}
Expand Down

0 comments on commit 1251b38

Please sign in to comment.