BF.INFO

语法
BF.INFO key [CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION]
可用版本
Redis 开源版 / Bloom 1.0.0
时间复杂度
O(1)
ACL 分类
@bloom, @read, @fast,

返回 Bloom 过滤器的信息。

必选参数

key

是 Bloom 过滤器的键名。

可选参数

CAPACITY

返回在需要扩展之前,此 Bloom 过滤器可以存储的唯一项的数量(包括已添加的项)。

SIZE

返回内存大小:为此 Bloom 过滤器分配的字节数。

FILTERS

返回子过滤器的数量。

ITEMS

返回添加到此 Bloom 过滤器并检测为唯一项的数量(这些项导致至少一个子过滤器中的至少一个位被设置)。

EXPANSION

返回扩展速率。

未指定可选参数时:返回所有信息字段。

返回值

未指定可选参数时,返回以下回复之一

指定可选参数时,返回以下回复之一

  • 整数回复 - 参数值
  • 出错时返回 [](参数无效、键不存在、键类型错误等)

示例

redis> BF.ADD bf1 observation1
(integer) 1
redis> BF.INFO bf1
 1) Capacity
 2) (integer) 100
 3) Size
 4) (integer) 240
 5) Number of filters
 6) (integer) 1
 7) Number of items inserted
 8) (integer) 1
 9) Expansion rate
10) (integer) 2
redis> BF.INFO bf1 CAPACITY
1) (integer) 100

评价本页
回到顶部 ↑
© . This site is unofficial and not affiliated with Redis, Inc.