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

考虑加入盗取门槛信息 #273

Open
ChunelFeng opened this issue Oct 23, 2023 · 3 comments
Open

考虑加入盗取门槛信息 #273

ChunelFeng opened this issue Oct 23, 2023 · 3 comments

Comments

@ChunelFeng
Copy link
Owner

是可以优化一些的,但是不是很多

原先的

[2023-10-23 23:58:21.626] ----> [MyTimerAspect] [] time cost is : [46252.16] ms
[2023-10-23 23:59:07.309] ----> [MyTimerAspect] [] time cost is : [45680.90] ms
[2023-10-23 23:59:52.901] ----> [MyTimerAspect] [] time cost is : [45590.37] ms
[2023-10-24 00:00:38.379] ----> [MyTimerAspect] [] time cost is : [45477.71] ms
[2023-10-24 00:01:24.546] ----> [MyTimerAspect] [] time cost is : [46165.72] ms

修改后,加入 has_task标志的

[2023-10-23 23:54:26.765] ----> [MyTimerAspect] [] time cost is : [46127.58] ms
[2023-10-23 23:55:10.238] ----> [MyTimerAspect] [] time cost is : [43471.36] ms
[2023-10-23 23:55:55.499] ----> [MyTimerAspect] [] time cost is : [45259.14] ms
[2023-10-23 23:56:40.547] ----> [MyTimerAspect] [] time cost is : [45046.93] ms

加入细分 task 标志的

[2023-10-24 00:03:42.896] ----> [MyTimerAspect] [] time cost is : [45627.15] ms
[2023-10-24 00:04:27.577] ----> [MyTimerAspect] [] time cost is : [44678.83] ms
[2023-10-24 00:05:12.058] ----> [MyTimerAspect] [] time cost is : [44479.49] ms
[2023-10-24 00:05:56.153] ----> [MyTimerAspect] [] time cost is : [44093.69] ms
[2023-10-24 00:06:40.338] ----> [MyTimerAspect] [] time cost is : [44184.32] ms

@ChunelFeng
Copy link
Owner Author

image

@ChunelFeng
Copy link
Owner Author

image

但是这样,可能会导致个别情况下,个别队列无法盗取。因为本来数据就不是 原子的。应该抛弃这种方式了

@ChunelFeng
Copy link
Owner Author

可以考虑,thread 中,添加一个 bool变量,标记是否有内容可以偷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant