Method: Redis::Commands::HyperLogLog#pfcount

Defined in:
lib/redis/commands/hyper_log_log.rb

#pfcount(*keys) ⇒ Integer

Get the approximate cardinality of members added to HyperLogLog structure.

If called with multiple keys, returns the approximate cardinality of the union of the HyperLogLogs contained in the keys.

Parameters:

  • keys (String, Array<String>)

Returns:

  • (Integer)


22
23
24
# File 'lib/redis/commands/hyper_log_log.rb', line 22

def pfcount(*keys)
  send_command([:pfcount] + keys.flatten(1))
end