Rank command providers by recorded cost in a recent time window
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- swift
- Área
- desktop, performance
Línea de trabajo
Start with ScriptWidget.record in Sources/StableBar/ScriptWidget.swift, ScriptDiagnostics in Sources/StableBar/ProviderConfiguration.swift, and the Settings → Status overview in Sources/StableBar/DiagnosticsView.swift; read the provider guide for measurement limits. Build a shared, bounded time-window aggregate from reported execution results and show its window, observation period, recorded CPU time, run counts and duration summary. Done means shared providers appear once, expired work drops out, and unavailable or unmeasured work is clearly identified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Status already shows cumulative completed-command CPU time and execution counts for each source. Those lifetime totals do not answer which user command provider has cost the most during the same recent period. A source that has run since login cannot be compared fairly with one enabled a few minutes ago, and last-run duration can miss a frequently repeated cheap command.
Users need a recent aggregate comparison of StableBar's own command sources, not another system-wide process monitor or a log of individual runs.
Proposal
Add a recent-cost ranking to the existing Settings → Status overview. Use one clearly labelled time window, such as the last 5 or 15 minutes, and show each command source's recorded completed-command CPU seconds, completed-run count/rate and duration summary for that window.
Use execution results already reported to the runner. Count a shared provider once and identify its consuming widgets. Do not poll the whole process list, add persistent traces, expose a per-run history, or introduce --logs/--follow.
Acceptance
- All ranked sources use the same recent window, with the window and available observation period shown. Old work stops affecting the ranking once it leaves the window.
- Ordering by recorded completed-command CPU time lets the user identify the largest recorded recent cost; run count/rate and a duration summary explain frequent or slow commands.
- A shared provider appears once, regardless of its number of widgets or displays.
- The UI names the metric “completed-command CPU time,” not live CPU percentage, battery impact or total source cost. Missing/unavailable accounting is explicit rather than presented as measured zero.
- Long-running streams, native in-process work and deliberately detached descendants are not claimed to be fully measured. A stream's unrecorded live cost is not ranked as zero.
- The feature needs no whole-process sampling or command stdout/stderr retention. Existing per-widget totals and actions remain available.
Possible today
Existing capability / workaround
ScriptWidget.recordalready accumulatesCommandResult.cpuTime.ScriptDiagnosticsalready exposes counters and duration information.Status technical detailsshows the cumulative CPU total and counters for one widget at a time.- The provider guide explicitly says that CPU time covers completed commands and is not a live meter for a running stream.
- The performance guide explains measuring the bar and states that commands run in separate processes. Activity Monitor or Instruments can inspect those processes. A user can also take two runtime-query snapshots and compare the cumulative counters manually.
The missing capability is a same-window aggregate ranking of the recorded source costs. It is not generic CPU monitoring.
Reviewed main: 01bf12a1a67f6083342421efa090e48213fbe62e. Latest stable reviewed: 0.17.0. No CPU, battery or execution-cost measurement was performed for this request; no app interaction, build or test was run.
Related
- #95 / #545 cover published whole-bar performance measurements and their method. They do not rank the user's command providers in the running app.
- #233 / #234 add the system monitor's app/process CPU and memory list. That system-wide list does not attribute the runner's recorded recent work to shared provider IDs.
- #307 was declined: the owner said Status and Send Feedback cover most debugging for now. It proposed per-run history, stderr, stream restarts/events/configuration loads, unified logging and
--logs/--follow. This request excludes all of those. It is only a bounded recent aggregate of existing execution-cost counters, for comparing sources rather than replaying failures.
Triaged by OMP (closerouter/openai/gpt-6.1-sol).
- Lenguaje dominante
- Swift
- Estrellas
- 184
- Forks
- 12
- Merge medio
- 3 h 50 min
- PR fusionados (30 d)
- 387
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Seb-GRAF/StableBar
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
Menu bar items drawn as in the menu bar show the wrong part of the menu bar after a display changePosiblemente ocupada @Jonathanm10 la tomó hoy. Abiertoneeds-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
-
Allow the App Menu to display the frontmost app iconPosiblemente ocupada @khatami10 la tomó hoy. Abiertoenhancement needs-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de Seb-GRAF/StableBar
Issues similares
-
good first issue help wanted testing
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
-
area:cli documentation good first issue priority:low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
isaaclins/freesnitch#430 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día