Rank command providers by recorded cost in a recent time window
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- swift
- Domain
- desktop, performance
Research direction
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.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Swift
- Stars
- 184
- Forks
- 12
- Avg merge
- 3h 50m
- Merged PRs (30d)
- 387
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Seb-GRAF/StableBar
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Menu bar items drawn as in the menu bar show the wrong part of the menu bar after a display changePossibly taken @Jonathanm10 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Allow the App Menu to display the frontmost app iconPossibly taken @khatami10 claimed this today. Openenhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in Seb-GRAF/StableBar
Similar issues
-
good first issue help wanted testing
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area:cli documentation good first issue priority:low
Difficulty 1/5 Under an hour Newbie friendliness 94/100
isaaclins/freesnitch#430 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day