mirror of
https://github.com/ChenXu233/nonebot_plugin_dialectlist.git
synced 2024-11-23 23:55:29 +08:00
⚗️ 测试速率
This commit is contained in:
parent
a765267cf1
commit
c94de918e9
@ -224,7 +224,9 @@ async def handle_rank(
|
||||
await saa.Text("没有指定群哦").finish()
|
||||
|
||||
if plugin_config.counting_cache:
|
||||
t1 = t.time()
|
||||
raw_rank = await get_cache(start, stop, id)
|
||||
logger.debug(f"获取计数消息花费时间:{t.time() - t1}")
|
||||
else:
|
||||
t1 = t.time()
|
||||
messages = await get_message_records(
|
||||
@ -237,8 +239,8 @@ async def handle_rank(
|
||||
time_stop=stop,
|
||||
exclude_id1s=plugin_config.excluded_people,
|
||||
)
|
||||
logger.debug(f"获取计数消息花费时间:{t.time() - t1}")
|
||||
raw_rank = msg_counter(messages)
|
||||
logger.debug(f"获取计数消息花费时间:{t.time() - t1}")
|
||||
|
||||
if not raw_rank:
|
||||
await saa.Text("明明这个时间段都没有人说话怎么会有话痨榜呢?").finish()
|
||||
|
@ -6,10 +6,10 @@ from nonebot import get_driver, get_plugin_config
|
||||
class ScopedConfig(BaseModel):
|
||||
get_num: int = 5 # 获取人数数量
|
||||
font: str = "SimHei" # 字体格式
|
||||
suffix: bool = False # 是否显示后缀
|
||||
suffix: bool = True # 是否显示后缀
|
||||
excluded_self: bool = True # 是否排除自己
|
||||
visualization: bool = True # 是否可视化
|
||||
counting_cache: bool = True # 计数缓存(能够提高回复速度)
|
||||
counting_cache: bool = False # 计数缓存(能够提高回复速度)
|
||||
excluded_people: List[str] = [] # 排除的人的QQ号
|
||||
timezone: Optional[str] = "Asia/Shanghai" # 时区,影响统计时间
|
||||
string_suffix: str = "统计花费时间:{timecost}秒" # 消息格式后缀
|
||||
|
Loading…
Reference in New Issue
Block a user