summaryrefslogtreecommitdiff
path: root/utils/hyperloglog/hll-err.rb
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hyperloglog/hll-err.rb')
-rw-r--r--utils/hyperloglog/hll-err.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/hyperloglog/hll-err.rb b/utils/hyperloglog/hll-err.rb
index 8481844bc..75bb8e424 100644
--- a/utils/hyperloglog/hll-err.rb
+++ b/utils/hyperloglog/hll-err.rb
@@ -18,9 +18,9 @@ while true do
elements << ele
i += 1
}
- r.padd('hll',*elements)
+ r.pfadd('hll',*elements)
}
- approx = r.pcount('hll')
+ approx = r.pfcount('hll')
abs_err = (approx-i).abs
rel_err = 100.to_f*abs_err/i
puts "#{i} vs #{approx}: #{rel_err}%"