Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 添加简单统计功能 #661

Closed
wants to merge 2 commits into from
Closed

✨ 添加简单统计功能 #661

wants to merge 2 commits into from

Conversation

AzideCupric
Copy link
Collaborator

No description provided.

@AzideCupric AzideCupric requested a review from felinae98 December 4, 2024 15:46
Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for nonebot-bison ready!

Name Link
🔨 Latest commit dc45da8
🔍 Latest deploy log https://app.netlify.com/sites/nonebot-bison/deploys/67507986bac51000085de851
😎 Deploy Preview https://deploy-preview-661--nonebot-bison.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 91.26214% with 9 lines in your changes missing coverage. Please review.

Project coverage is 85.34%. Comparing base (22bf059) to head (dc45da8).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
nonebot_bison/scheduler/statistic.py 93.65% 4 Missing ⚠️
nonebot_bison/scheduler/manager.py 70.00% 3 Missing ⚠️
nonebot_bison/scheduler/scheduler.py 83.33% 1 Missing ⚠️
nonebot_bison/utils/__init__.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #661      +/-   ##
==========================================
+ Coverage   85.23%   85.34%   +0.10%     
==========================================
  Files          97       98       +1     
  Lines        5473     5574     +101     
==========================================
+ Hits         4665     4757      +92     
- Misses        808      817       +9     
Flag Coverage Δ
smoke-test 85.34% <91.26%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@suyiiyii suyiiyii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sample:

新增订阅hook调用记录:
删除订阅hook调用记录:
调度统计:
  weibo:
    792958: 1266 次
    794708: 1265 次
  arknights:
    default: 254 次
  bilibili:
    354678198: 127 次
发送消息统计:
  明日方舟游戏信息:
    2 次
所有调度对象:
  arknights:
    default: [权重]0 | [批量]False
  bilibili.com:
    354678198: [权重]0 | [批量]False
  live.bilibili.com:
  bilibili.com/bangumi:
  ceobe_canteen:
  AnonymousScheduleConfig[ff14]:
  music.163.com:
  rss:
  weibo.com:
    792958: [权重]-10 | [批量]False
    794708: [权重]10 | [批量]False

「所有调度对象」里面,某一项,如果是空的,是不是可以不输出这一项 (或者加个选项?

@felinae98
Copy link
Collaborator

说实话,这个该用 metrics 来做

@@ -3,6 +3,7 @@
from datetime import time, datetime
from collections.abc import Callable, Sequence, Awaitable

from loguru import logger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么没有用 nb 的 logger

db_target = Target(target=target, platform_name=platform_name, target_name=target_name)
await asyncio.gather(*[hook(platform_name, target) for hook in self.add_target_hook])
hook_resp = await asyncio.gather(*[hook(platform_name, target) for hook in self.add_target_hook])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 hook resp 的内容会是什么

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hook func的返回值 虽然目前为空就是了(

@AzideCupric AzideCupric added the duplicate This issue or pull request already exists label Jan 5, 2025
@AzideCupric
Copy link
Collaborator Author

#666 完成

@AzideCupric AzideCupric closed this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants