MagicStack / MagicStack/uvloop
Event loop load metrics
還沒有人認領這個 Issue。
- 主要語言
- Cython
- 星號
- 11.9k
- 分支
- 616
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Hello!
First, the motivation. We're running a fair number of asyncio services in production, and I'm trying to figure out how to expose some sort of load metrics. These metrics would be useful for tweaking and autoscaling said services. We're using UVLoop, of course (thank you very much!).
I think exposing a busyness factor from the event loop would be a very interesting notion. Something like the percentage of the time in the last n seconds or so that the loop was idle: no tasks to switch to, just waiting on external inputs.
I guess I was looking for something sort of similar to https://github.com/MagicStack/uvloop/issues/267. I'm not sure it should be a debug build feature though, since these metrics are most important in a high load production environment, where you want your libraries operating at max efficiency.
I think over at that issue it was mentioned that UVLoop should have little to no non-asyncio functionality, so my first question is: should I take this discussion over to python-dev instead? My instinct was to first try proving the concept in a third party implementation, then see about making it part of the official API.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先檢視連結的 uvloop issue #267,以及這項工作應該歸屬於 uvloop 還是 Python 的 asyncio API。定義閒置時間或忙碌程度的指標,並判斷第三方 prototype 是否是合適的第一步。若要視為完成,就必須對 API 或 prototype 的方向達成共識,因為目前尚未指出任何實作檔案或測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- backend, networking
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100