MagicStack / MagicStack/uvloop

Event loop load metrics

Aperta
#322 2 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Cython
Stelle
11.9k
Fork
616
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando la issue #267 di uvloop collegata e la questione se questo debba rientrare in uvloop o nell’API asyncio di Python. Definisci la metrica del tempo di inattività o del livello di attività e determina se un prototipo di terze parti sia il primo passo appropriato. Per considerarlo completato, sarebbe necessario concordare una direzione per l’API o il prototipo, poiché non sono stati identificati file di implementazione o test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend, networking
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.