Implement a configurable rate limit
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- python
研究方向
首先追蹤 canopen 使用的 python-can 訊息傳送路徑,並檢查如何在不丟棄框架的情況下排程佇列中的訊息。完成的標誌是定義可設定的每秒訊息數限制,且佇列中的傳輸遵守要求的間隔。
由索引模型根據 Issue 內容生成。
描述
I am using python-can (more specifically canopen) to send out messages to a bunch or nodes.
Issues seem to arise when I send a lot of packets at the same time, my assumption is that the recipients can not keep up with the frame stream, and thus packets are dropped.
My Idea is to implement some sort of rate limiting, for example by passing messages to a queue and having the library send out all queued messages with an interval inbetween.
Something like
queue = queue.Queue()
while True:
msg = queue.get() # blocking
transmit(msg)
time.sleep(1 / self.max_messages_per_second)
Cheers!
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 701
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
hardbyte/python-can#2103 ·
-
Unhashable type for Systec interface errors可能已有人在做 @giri256 於 79 天前認領。 未關閉bug
難度 1/5 1 小時以內 新手友好度 78/100
hardbyte/python-can#2077 · 1 則留言 · 1 個 reaction ·
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
-
Make socket binding exceptions more debugable可能已有人在做 @vonpanda 於 7 天前認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 75/100
hardbyte/python-can#2104 ·
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
hardbyte/python-can#2102 ·
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
python triage
難度 2/5 1-3 小時 新手友好度 82/100
microsoft/semantic-kernel#14590 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
pinterest/pymemcache#662 ·
維護者通常 1 天內回覆
-
難度 2/5 半天 新手友好度 62/100
gnocchixyz/gnocchi#1527 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
tenstorrent/tt-model-manager#181 ·
維護者通常 1 天內回覆